Re: [PATCH] scsi: Fix incorrect usage of shost_for_each_device

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

 



On 2020-05-18 00:44, Ye Bin wrote:
> shost_for_each_device(sdev, shost) \
> 	for ((sdev) = __scsi_iterate_devices((shost), NULL); \
> 	     (sdev); \
> 	     (sdev) = __scsi_iterate_devices((shost), (sdev)))
> 
> When terminating shost_for_each_device() iteration with break or return,
> scsi_device_put() should be used to prevent stale scsi device references from
> being left behind.

Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>



[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