Re: [PATCH 6/9] scsi_dh: add generic SPC-3 alua handler

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

 



On Fri, 2008-06-27 at 16:33 +0200, Hannes Reinecke wrote:
> I cannot see how this _could_ fail, as this function is provided by
> the module, so the very existence of the function depends on the
> module. But maybe it's better to check, even so.
> 
> I'll send an updated patch.

Just because you're in the actual module it's not safe to assume
try_module_get() will succeed.  The modules have a state variable
(->state) if the user tries to remove the module, this state check will
fail in try_module_get() and it will actually return a failure.

James


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