net: fix CONFIG_NET_NS=n compilation
authorEric Dumazet <edumazet@google.com>
Thu, 12 Mar 2015 03:27:52 +0000 (20:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2015 03:28:49 +0000 (23:28 -0400)
I forgot to use write_pnet() in three locations.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: 33cf7c90fe2f9 ("net: add real socket cookies")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ipv4.c
net/ipv4/syncookies.c
net/ipv4/tcp_input.c

index 207281ae35364e7d3ca599e1fd316fe67d50c6f4..a78e0b999f96a4ea138bd558cdd2724515ad56d6 100644 (file)
@@ -641,7 +641,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
        ireq = inet_rsk(req);
        ireq->ir_loc_addr = ip_hdr(skb)->daddr;
        ireq->ir_rmt_addr = ip_hdr(skb)->saddr;
-       ireq->ireq_net = sock_net(sk);
+       write_pnet(&ireq->ireq_net, sock_net(sk));
        atomic64_set(&ireq->ir_cookie, 0);
 
        /*
index ece31b42601320bc69ed87bfda7577ab82f50ea6..18e5a67fda8183d8c4dd560c15936693be167667 100644 (file)
@@ -346,7 +346,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
        req->ts_recent          = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsval : 0;
        treq->snt_synack        = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsecr : 0;
        treq->listener          = NULL;
-       ireq->ireq_net          = sock_net(sk);
+       write_pnet(&ireq->ireq_net, sock_net(sk));
 
        /* We throwed the options of the initial SYN away, so we hope
         * the ACK carries the same options again (see RFC1122 4.2.3.8)
index d7045f5f6ebf83536376a017a057317bbf9b9ca1..26f24995bd3dbd61088cbd917660f320d4546d58 100644 (file)
@@ -5965,7 +5965,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
 
        tmp_opt.tstamp_ok = tmp_opt.saw_tstamp;
        tcp_openreq_init(req, &tmp_opt, skb, sk);
-       inet_rsk(req)->ireq_net = sock_net(sk);
+       write_pnet(&inet_rsk(req)->ireq_net, sock_net(sk));
        atomic64_set(&inet_rsk(req)->ir_cookie, 0);
 
        af_ops->init_req(req, sk, skb);