summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Walker <dwalker@mvista.com>2007-02-14 09:33:14 +0100
committerAdrian Bunk <bunk@stusta.de>2007-02-14 09:33:14 +0100
commitd87345bcbc5e636f60df56845a39e00d6ae22911 (patch)
tree7d6f5cd58d1f54c2f747cbf47edc87b6dc6bef7d
parent8d406a21f39b1f5b30360f0c3a0113dc0bf47d51 (diff)
[ATM]: Fix for crash in adummy_init()
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>
-rw-r--r--net/atm/common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/atm/common.c b/net/atm/common.c
index 6656b111cc05..0f25a0b7b912 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -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");