]> git.baikalelectronics.ru Git - kernel.git/commit
inet: fix races in reqsk_queue_hash_req()
authorEric Dumazet <edumazet@google.com>
Sat, 19 Sep 2015 16:48:04 +0000 (09:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Sep 2015 23:32:29 +0000 (16:32 -0700)
commit16163ad003f8cd186a6961ca7821cf3916403fbf
tree7a9804d32ed57d2898c67e13e607031341434c7a
parentae418b4f601b706c9ebf9b78a2f9db0a6da0bb2d
inet: fix races in reqsk_queue_hash_req()

Before allowing lockless LISTEN processing, we need to make
sure to arm the SYN_RECV timer before the req socket is visible
in hash tables.

Also, req->rsk_hash should be written before we set rsk_refcnt
to a non zero value.

Fixes: 95313fcb2b6f ("inet: get rid of central tcp/dccp listener timer")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ying Cai <ycai@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_connection_sock.c