Re: [PATCH V6 10/18] scsi: ufs: manually add well known logical units

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

 



On Sat, Oct 04, 2014 at 01:16:16AM +0900, Akinobu Mita wrote:
> These __scsi_add_device() calls for W-LUs increase the module reference
> count of ufshcd.ko by three.  But no one calls scsi_device_put() for
> these W-LUs, so it is impossible to unload ufshcd.ko.
> 
> There are scsi_remove_device() calls for W-LUs in ufshcd_scsi_remove_wlus(),
> But these calls do nothing (please see a comment below).
> 
> I could fix this issue by putting scsi_device_put() just after each
> __scsi_add_device() call.  I'll prepare a patch if I haven't missed
> something.


> When ufshcd_scsi_remove_wlus() is called in ufshcd_remove(), these
> three W-LU devices have already been deleted by scsi_remove_host() which
> is called just before ufshcd_scsi_remove_wlus().  The scsi
> device state of these W-LU devices is SDEV_DEL at this time, and
> scsi_remove_device() does nothing.


No, we need to keep a reference to avoid them going away due to a manual
delete.  We need a scsi_device_put where we currently call
scsi_remove_device I guess.
--
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