[NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS.
[firefly-linux-kernel-4.4.55.git] / net / sctp / protocol.c
index 2faa0d8839ebf04eb27571075510e01736ff6690..5aea91137fbb3c8760dc210b72b74b09930a8218 100644 (file)
@@ -554,7 +554,7 @@ static struct sock *sctp_v4_create_accept_sk(struct sock *sk,
 {
        struct inet_sock *inet = inet_sk(sk);
        struct inet_sock *newinet;
-       struct sock *newsk = sk_alloc(sk->sk_net, PF_INET, GFP_KERNEL,
+       struct sock *newsk = sk_alloc(sock_net(sk), PF_INET, GFP_KERNEL,
                        sk->sk_prot);
 
        if (!newsk)