Skip to content

Commit

Permalink
[AF_UNIX] Initialise UNIX sockets before general device initcalls
Browse files Browse the repository at this point in the history
When drivers call request_module(), it tries to do something with UNIX
sockets and triggers a 'runaway loop modprobe net-pf-1' warning. Avoid
this by initialising AF_UNIX support earlier.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Woodhouse authored and David S. Miller committed Apr 24, 2008
1 parent c9c1014 commit 3d36696
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2193,7 +2193,11 @@ static void __exit af_unix_exit(void)
unregister_pernet_subsys(&unix_net_ops);
}

module_init(af_unix_init);
/* Earlier than device_initcall() so that other drivers invoking
request_module() don't end up in a loop when modprobe tries
to use a UNIX socket. But later than subsys_initcall() because
we depend on stuff initialised there */
fs_initcall(af_unix_init);
module_exit(af_unix_exit);

MODULE_LICENSE("GPL");
Expand Down

0 comments on commit 3d36696

Please sign in to comment.