Re: [Suggestion] drivers/target/sbp/ : set tport->tpg to NULL when clean up for failure.

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

 



Hello Chris Boot:

  need I send the relative patch ?

  Regards

gchen.


于 2012年12月06日 16:40, Chen Gang 写道:
> 于 2012年12月06日 16:34, Chris Boot 写道:
>> On 06/12/12 04:24, Chen Gang wrote:
>>> Hello Maintainers: 
>>>
>>> in drivers/target/sbp/sbp_target.c:
>>>
>>>    tport->tpg must be NULL before process it in function sbp_make_tpg. (line 2185..2188)
>>>    tport->tpg assigned a ptr (line 2198)
>>>    if processing failed, not set tport->tpg = NULL (line 2208..2212, 2217..2221)
>>>
>>>    we have done: when free tport->tpg, set it to NULL (line 2233..2234)
>>>
>>>    is it valuable to let tport->tpg = NULL, when clean up for failure ?
>>>
>> <snip>
>>
>> Yes, that's a good catch. The way it is now, if we fail to set up the
>> TPG, the port will be left in an inconsistent state. I'll prepare a
>> patch ASAP unless you'd rather do it yourself.
>>
>> Thanks,
>> Chris
>>
> 
>   please help do it (better to mark me as Reported-by in your patch).
> 
>   thanks.
> 
>   :-)
> 
> 


-- 
Chen Gang

Asianux Corporation
--
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