]> git.baikalelectronics.ru Git - kernel.git/commit
tcp/dccp: fix ireq->pktopts race
authorEric Dumazet <edumazet@google.com>
Fri, 30 Oct 2015 16:46:12 +0000 (09:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Nov 2015 20:38:26 +0000 (15:38 -0500)
commit4044ef548b377edc1ba1e3633e1bf0f8178e50e5
tree96cae05caf0bddb2f7b3646efcabff06926cb13e
parent95422bbf062f9106c82144ec78ad7f8162a0f2f7
tcp/dccp: fix ireq->pktopts race

IPv6 request sockets store a pointer to skb containing the SYN packet
to be able to transfer it to full blown socket when 3WHS is done
(ireq->pktopts -> np->pktoptions)

As explained in commit 95c4998b98f4 ("tcp/dccp: fix hashdance race for
passive sessions"), we must transfer the skb only if we won the
hashdance race, if multiple cpus receive the 'ack' packet completing
3WHS at the same time.

Fixes: 6c67d9803aed ("tcp: do not lock listener to process SYN packets")
Fixes: aaf9f4668c2b ("tcp/dccp: install syn_recv requests into ehash table")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ipv6.c
net/ipv6/tcp_ipv6.c