Skip to content

Commit

Permalink
[ATM]: Fix for crash in adummy_init()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Daniel Walker authored and David S. Miller committed Feb 8, 2007
1 parent f5a6e01 commit 84ff602
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/atm/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 84ff602

Please sign in to comment.