]>
Commit | Line | Data |
---|---|---|
a1cd50fd GKH |
1 | From stable-bounces@linux.kernel.org Tue Feb 6 21:57:59 2007 |
2 | From: Daniel Walker <dwalker@mvista.com> | |
3 | Date: Tue, 06 Feb 2007 21:56:37 -0800 (PST) | |
4 | Subject: Fix ATM initcall ordering. | |
5 | To: stable@kernel.org | |
6 | Cc: bunk@stusta.de | |
7 | Message-ID: <20070206.215637.55835926.davem@davemloft.net> | |
8 | ||
9 | From: Daniel Walker <dwalker@mvista.com> | |
10 | ||
11 | [ATM]: Fix for crash in adummy_init() | |
12 | ||
13 | This was reported by Ingo Molnar here, | |
14 | ||
15 | http://lkml.org/lkml/2006/12/18/119 | |
16 | ||
17 | The problem is that adummy_init() depends on atm_init() , but adummy_init() | |
18 | is called first. | |
19 | ||
20 | So I put atm_init() into subsys_initcall which seems appropriate, and it | |
21 | will still get module_init() if it becomes a module. | |
22 | ||
23 | Interesting to note that you could crash your system here if you just load | |
24 | the modules in the wrong order. | |
25 | ||
26 | Signed-off-by: Daniel Walker <dwalker@mvista.com> | |
27 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | |
28 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
29 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
30 | ||
31 | --- | |
32 | net/atm/common.c | 3 ++- | |
33 | 1 file changed, 2 insertions(+), 1 deletion(-) | |
34 | ||
35 | --- linux-2.6.20.1.orig/net/atm/common.c | |
36 | +++ linux-2.6.20.1/net/atm/common.c | |
37 | @@ -816,7 +816,8 @@ static void __exit atm_exit(void) | |
38 | proto_unregister(&vcc_proto); | |
39 | } | |
40 | ||
41 | -module_init(atm_init); | |
42 | +subsys_initcall(atm_init); | |
43 | + | |
44 | module_exit(atm_exit); | |
45 | ||
46 | MODULE_LICENSE("GPL"); |