module: remove over-zealous check in __module_get()
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 7 Feb 2009 07:45:56 +0000 (18:15 +1030)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 7 Feb 2009 16:33:01 +0000 (08:33 -0800)
commit7f9a50a5b89b87f8e754f59ae9968da28be618a5
treefd3baa0d66b14a6d5adc4f09088fa15dfcb5b7ab
parentf12b12a8aecfcafcf2f9df1c1658d2484959dfda
module: remove over-zealous check in __module_get()

Impact: fix spurious BUG_ON() triggered under load

module_refcount() isn't reliable outside stop_machine(), as demonstrated
by Karsten Keil <kkeil@suse.de>, networking can trigger it under load
(an inc on one cpu and dec on another while module_refcount() is tallying
 can give false results, for example).

Almost noone should be using __module_get, but that's another issue.

Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/module.h