Commit c41cbcb7 authored by David S. Miller's avatar David S. Miller

sock_register inet6_family_ops before we do init

calls which might try to create ipv6 sockets.
parent 0e28f14f
...@@ -675,6 +675,11 @@ static int __init inet6_init(void) ...@@ -675,6 +675,11 @@ static int __init inet6_init(void)
*/ */
inet6_register_protosw(&rawv6_protosw); inet6_register_protosw(&rawv6_protosw);
/* Register the family here so that the init calls below will
* be able to create sockets. (?? is this dangerous ??)
*/
(void) sock_register(&inet6_family_ops);
/* /*
* ipngwg API draft makes clear that the correct semantics * ipngwg API draft makes clear that the correct semantics
* for TCP and UDP is to consider one TCP and UDP instance * for TCP and UDP is to consider one TCP and UDP instance
...@@ -719,9 +724,6 @@ static int __init inet6_init(void) ...@@ -719,9 +724,6 @@ static int __init inet6_init(void)
udpv6_init(); udpv6_init();
tcpv6_init(); tcpv6_init();
/* Now the userspace is allowed to create INET6 sockets. */
(void) sock_register(&inet6_family_ops);
return 0; return 0;
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment