diff options
author | Daniel Walker <dwalker@mvista.com> | 2007-02-05 21:04:06 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-08 15:38:53 -0500 |
commit | 84ff602efba2664762070add0600aa5c870a2659 (patch) | |
tree | c4ca2f4acb4210edce543e677a7308de6ee4211c /net/atm/common.c | |
parent | f5a6e01c093ca60c0cab15c47c8e7e199fbbc9e6 (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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/common.c')
-rw-r--r-- | net/atm/common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/atm/common.c b/net/atm/common.c index fbabff494468..a2878e92c3ab 100644 --- a/net/atm/common.c +++ b/net/atm/common.c | |||
@@ -816,7 +816,8 @@ static void __exit atm_exit(void) | |||
816 | proto_unregister(&vcc_proto); | 816 | proto_unregister(&vcc_proto); |
817 | } | 817 | } |
818 | 818 | ||
819 | module_init(atm_init); | 819 | subsys_initcall(atm_init); |
820 | |||
820 | module_exit(atm_exit); | 821 | module_exit(atm_exit); |
821 | 822 | ||
822 | MODULE_LICENSE("GPL"); | 823 | MODULE_LICENSE("GPL"); |