[PATCH -mm] fix for crash in adummy_init()
- From: Daniel Walker <dwalker@xxxxxxxxxx>
- Date: Sat, 30 Dec 2006 07:49:41 -0800
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@xxxxxxxxxx>
---
net/atm/common.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6.19/net/atm/common.c
===================================================================
--- linux-2.6.19.orig/net/atm/common.c
+++ linux-2.6.19/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 linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Prev by Date: Should be [PATCH -mm] -- Re: [PATCH -rt] panic on SLIM + selinux
- Next by Date: [RFC][PATCH] A new memory algorithm for the embedded linux system
- Previous by thread: [PATCH -rt] panic on SLIM + selinux
- Next by thread: [RFC][PATCH] A new memory algorithm for the embedded linux system
- Index(es):
Relevant Pages
- Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series..
... you should get in touch with Thomas Gleixner and Ingo Molnar, ... to think that
they have to do any fixups after it his *my* tree. ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - Re: [RFC PATCH 0/5 v2] Convert all tasklets to workqueues V2
... This is version 2 of the tasklet to workqueue conversion. ... (recommended by
Ingo Molnar) ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - Re: RSDL v0.31
... On my desktop, mainline completely breaks down, and no nicing may rescue. ...
So neither does a good job with this load. ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - Re: [RFC] use realmode code to reserve end-of-conventional-memory to 1MB
... Ingo Molnar wrote: ... changed the order in which things happened at boot
time. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - Re: patch-2.6.21.3-rt9 misnamed?
... Ingo Molnar wrote: ... help someone else out rather than as a complaint.
... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please
read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel)