public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] module: remove over-zealous check in __module_get()
@ 2009-02-07  7:45 Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2009-02-07  7:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Karsten Keil, stable

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>
---
 include/linux/module.h |    1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/module.h b/include/linux/module.h
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -407,7 +407,6 @@ static inline void __module_get(struct m
 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();
 	}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-07  7:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-07  7:45 [PATCH] module: remove over-zealous check in __module_get() Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox