diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-02-07 18:15:56 +1030 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-12 09:50:26 -0800 |
commit | dec125f42f7dcfa7d327d467485f4ea8ef8ab0df (patch) | |
tree | 4e2e3266e33f3537ecceff6de020d687eb80ab77 /include | |
parent | 7590496e9c5ad30e25359aba1b1cc32ddbadd834 (diff) |
module: remove over-zealous check in __module_get()
commit 7f9a50a5b89b87f8e754f59ae9968da28be618a5 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 3bfed013350..446263ca07f 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -391,7 +391,6 @@ void symbol_put_addr(void *addr); static inline void __module_get(struct module *module) { if (module) { - BUG_ON(module_refcount(module) == 0); local_inc(&module->ref[get_cpu()].count); put_cpu(); } |