[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200702060031.l160Vxqf004624@shell0.pdx.osdl.net>
Date: Mon, 05 Feb 2007 16:30:56 -0800
From: akpm@...ux-foundation.org
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, akpm@...ux-foundation.org,
dwalker@...sta.com, chas@....nrl.navy.mil, mingo@...e.hu
Subject: [patch 03/11] fix for crash in adummy_init()
From: Daniel Walker <dwalker@...sta.com>
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@...sta.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: chas williams <chas@....nrl.navy.mil>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
net/atm/common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN net/atm/common.c~fix-for-crash-in-adummy_init net/atm/common.c
--- a/net/atm/common.c~fix-for-crash-in-adummy_init
+++ a/net/atm/common.c
@@ -816,7 +816,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");
_
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists