]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ATM]: Fix for crash in adummy_init()
authorDaniel Walker <dwalker@mvista.com>
Tue, 6 Feb 2007 02:04:06 +0000 (18:04 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 8 Feb 2007 20:38:53 +0000 (12:38 -0800)
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/atm/common.c

index fbabff49446830b45053103615095a44e0486c7d..a2878e92c3abd903d734c48349aacc173e8b6bee 100644 (file)
@@ -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");