]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[ATM]: Fix for crash in adummy_init()
authorDaniel Walker <dwalker@mvista.com>
Wed, 14 Feb 2007 08:33:14 +0000 (09:33 +0100)
committerAdrian Bunk <bunk@stusta.de>
Wed, 14 Feb 2007 08:33:14 +0000 (09:33 +0100)
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: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
net/atm/common.c

index 6656b111cc053de334c9885f0f6ccebe4cadd790..0f25a0b7b912d211e0101e7e80a97823811b3c56 100644 (file)
@@ -810,7 +810,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");