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

[IPV6]: Set sk_prot early enough in inet6_create()

It needs to be before the sk_set_owner() call
else we OOPS.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent daa4c67e
...@@ -174,10 +174,10 @@ static int inet6_create(struct socket *sock, int protocol) ...@@ -174,10 +174,10 @@ static int inet6_create(struct socket *sock, int protocol)
goto out; goto out;
sock_init_data(sock, sk); sock_init_data(sock, sk);
sk->sk_prot = answer_prot;
sk_set_owner(sk, sk->sk_prot->owner); sk_set_owner(sk, sk->sk_prot->owner);
rc = 0; rc = 0;
sk->sk_prot = answer_prot;
sk->sk_no_check = answer_no_check; sk->sk_no_check = answer_no_check;
if (INET_PROTOSW_REUSE & answer_flags) if (INET_PROTOSW_REUSE & answer_flags)
sk->sk_reuse = 1; sk->sk_reuse = 1;
......
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