diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2015-01-23 13:22:47 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-01-23 14:42:16 +1030 |
commit | dc4515ea26d6c7fed3d978cd2bd36adc0d057bc5 (patch) | |
tree | 5af9b7e384ae01cacea65f9a85cee4967fd2d494 /kernel/exit.c | |
parent | d5db139ab3764640e0882a1746e7b9fdee33fd87 (diff) | |
download | linux-stable-dc4515ea26d6c7fed3d978cd2bd36adc0d057bc5.tar.gz linux-stable-dc4515ea26d6c7fed3d978cd2bd36adc0d057bc5.tar.bz2 linux-stable-dc4515ea26d6c7fed3d978cd2bd36adc0d057bc5.zip |
scsi: always increment reference count
James reported:
> After e513cc1 module: Remove stop_machine from module unloading,
> module_refcount() is returning (unsigned long)-1 when called from within
> a routine that runs in module_exit. This is confusing the scsi device
> put code which is coded to detect a module_refcount() of zero for
> running within a module exit routine and not try to do another
> module_put. The fix is to restore the original behaviour of
> module_refcount() and return zero if we're running inside an exit
> routine.
The correct fix is to turn try_module_get() into __module_get(), and
always do the module_put().
Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/exit.c')
0 files changed, 0 insertions, 0 deletions