]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix RFS vs lockless listeners
authorEric Dumazet <edumazet@google.com>
Thu, 8 Oct 2015 18:16:48 +0000 (11:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Oct 2015 12:33:15 +0000 (05:33 -0700)
commit00008c36dc130905cdefda2c946d31fba0477b85
tree34a3fa802965d1c97f5c242b79436bb648fa13c9
parent95ba99eb3e36ed10d193f0b8d27ade9f8d324b3d
tcp: fix RFS vs lockless listeners

Before recent TCP listener patches, we were updating listener
sk->sk_rxhash before the cloning of master socket.

children sk_rxhash was therefore correct after the normal 3WHS.

But with lockless listener, we no longer dirty/change listener sk_rxhash
as it would be racy.

We need to correctly update the child sk_rxhash, otherwise first data
packet wont hit correct cpu if RFS is used.

Fixes: abe93be0399c ("tcp/dccp: install syn_recv requests into ehash table")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Willem de Bruijn <willemb@google.com>
Cc: Tom Herbert <tom@herbertland.com>
Acked-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/syncookies.c
net/ipv4/tcp_minisocks.c