All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] fix for crash in adummy_init()
@ 2006-12-30 15:49 Daniel Walker
  0 siblings, 0 replies; only message in thread
From: Daniel Walker @ 2006-12-30 15:49 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, mingo

This was reported by Ingo Molnar here,

http://lkml.org/lkml/2006/12/18/119

The problem is that adummy_init() depends on atm_init() , but adummy_init() is
called first.

So I put atm_init() into subsys_initcall which seems appropriate, and it will
still get module_init() if it becomes a module.

Interesting to note that you could crash your system here if you just load the
modules in the wrong order.

Signed-Off-By: Daniel Walker <dwalker@mvista.com>

---
 net/atm/common.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6.19/net/atm/common.c
===================================================================
--- linux-2.6.19.orig/net/atm/common.c
+++ linux-2.6.19/net/atm/common.c
@@ -816,7 +816,8 @@ static void __exit atm_exit(void)
 	proto_unregister(&vcc_proto);
 }
 
-module_init(atm_init);
+subsys_initcall(atm_init);
+
 module_exit(atm_exit);
 
 MODULE_LICENSE("GPL");
--

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

only message in thread, other threads:[~2006-12-30 15:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-30 15:49 [PATCH -mm] fix for crash in adummy_init() Daniel Walker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.