diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-02-07 10:45:56 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-07 19:33:01 +0300 |
commit | 7f9a50a5b89b87f8e754f59ae9968da28be618a5 (patch) | |
tree | fd3baa0d66b14a6d5adc4f09088fa15dfcb5b7ab /include | |
parent | f12b12a8aecfcafcf2f9df1c1658d2484959dfda (diff) | |
download | linux-7f9a50a5b89b87f8e754f59ae9968da28be618a5.tar.xz |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/module.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index f3b8329eb5b8..145a75528cc1 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -407,7 +407,6 @@ static inline local_t *__module_ref_addr(struct module *mod, int cpu) static inline void __module_get(struct module *module) { if (module) { - BUG_ON(module_refcount(module) == 0); local_inc(__module_ref_addr(module, get_cpu())); put_cpu(); } |