]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/ipv4/syncookies.c
tcp/dccp: fix ireq->opt races
[mirror_ubuntu-artful-kernel.git] / net / ipv4 / syncookies.c
index 03ad8778c395334ed53a250bccc0b991cd85c2f2..0f914fda5bf35dd9200917bb7efc12292b06163c 100644 (file)
@@ -355,7 +355,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
        /* 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)
         */
-       ireq->opt = tcp_v4_save_options(skb);
+       RCU_INIT_POINTER(ireq->ireq_opt, tcp_v4_save_options(skb));
 
        if (security_inet_conn_request(sk, skb, req)) {
                reqsk_free(req);