Re: [patch] scsi/osd: checking NULL instead of ERR_PTR()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/14/2010 03:39 PM, Boaz Harrosh wrote:
> On 11/12/2010 06:31 AM, Dan Carpenter wrote:
>> bio_map_kern() returns ERR_PTRs on failure and never returns NULL.
>>
>> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
>>
> 
> Acked-by: Boaz Harrosh <bharrosh@xxxxxxxxxxx>
> 

James! Please submit this patch for scsi-rc-fixes. It is an important
fix for code that went into this merge window.

Thanks
Boaz

>> diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
>> index 0433ea6..b798919 100644
>> --- a/drivers/scsi/osd/osd_initiator.c
>> +++ b/drivers/scsi/osd/osd_initiator.c
>> @@ -951,8 +951,8 @@ static int _osd_req_finalize_cdb_cont(struct osd_request *or, const u8 *cap_key)
>>  	/* create a bio for continuation segment */
>>  	bio = bio_map_kern(req_q, or->cdb_cont.buff, or->cdb_cont.total_bytes,
>>  			   GFP_KERNEL);
>> -	if (unlikely(!bio))
>> -		return -ENOMEM;
>> +	if (unlikely(IS_ERR(bio)))
>> +		return PTR_ERR(bio);
>>  
>>  	bio->bi_rw |= REQ_WRITE;
>>  
> 
> Wahoo, good catch, thanks! This is new code in 2.6.37-rc1. It should be pushed
> for current Kernel.
> 
> James: please apply to scsi-rc-fixes for the next round of fixes?
> 
> Thanks
> Boaz

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux