Eric Dumazet 7656d842de tcp: fix fastopen races vs lockless listener
There are multiple races that need fixes :

1) skb_get() + queue skb + kfree_skb() is racy

An accept() can be done on another cpu, data consumed immediately.
tcp_recvmsg() uses __kfree_skb() as it is assumed all skb found in
socket receive queue are private.

Then the kfree_skb() in tcp_rcv_state_process() uses an already freed skb

2) tcp_reqsk_record_syn() needs to be done before tcp_try_fastopen()
for the same reasons.

3) We want to send the SYNACK before queueing child into accept queue,
otherwise we might reintroduce the ooo issue fixed in
commit 7c85af881044 ("tcp: avoid reorders for TFO passive connections")

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-05 02:45:24 -07:00
..
2015-08-25 13:38:50 -07:00
2015-05-28 11:23:20 +08:00
2015-09-01 14:32:44 -07:00
2015-08-29 13:07:54 -07:00
2013-12-29 16:34:25 -05:00
2015-09-17 17:18:37 -07:00
2015-09-17 17:18:37 -07:00
2015-09-17 17:18:37 -07:00
2015-07-09 21:09:10 -07:00
2015-09-17 17:18:37 -07:00
2015-07-09 14:22:52 -07:00
2015-07-09 14:22:52 -07:00
2014-09-01 18:12:45 -07:00
2015-07-09 14:22:52 -07:00
2015-07-09 14:22:52 -07:00
2015-01-28 22:18:37 -08:00
2012-03-11 23:42:51 -07:00
2014-05-23 16:28:53 -04:00
2015-09-17 17:18:37 -07:00
2013-05-31 17:19:05 -07:00