]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.20.2/fix-atm-initcall-ordering.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.20.2 / fix-atm-initcall-ordering.patch
CommitLineData
a1cd50fd
GKH
1From stable-bounces@linux.kernel.org Tue Feb 6 21:57:59 2007
2From: Daniel Walker <dwalker@mvista.com>
3Date: Tue, 06 Feb 2007 21:56:37 -0800 (PST)
4Subject: Fix ATM initcall ordering.
5To: stable@kernel.org
6Cc: bunk@stusta.de
7Message-ID: <20070206.215637.55835926.davem@davemloft.net>
8
9From: Daniel Walker <dwalker@mvista.com>
10
11[ATM]: Fix for crash in adummy_init()
12
13This was reported by Ingo Molnar here,
14
15http://lkml.org/lkml/2006/12/18/119
16
17The problem is that adummy_init() depends on atm_init() , but adummy_init()
18is called first.
19
20So I put atm_init() into subsys_initcall which seems appropriate, and it
21will still get module_init() if it becomes a module.
22
23Interesting to note that you could crash your system here if you just load
24the modules in the wrong order.
25
26Signed-off-by: Daniel Walker <dwalker@mvista.com>
27Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
28Signed-off-by: David S. Miller <davem@davemloft.net>
29Signed-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");