]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix MSG_PEEK race check
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Sun, 10 May 2009 20:32:34 +0000 (20:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 May 2009 22:05:40 +0000 (15:05 -0700)
commit654eed360b7962ca33f09d7353dcdb788e3bdcdf
tree38ee8e4815d614c483be352524134c6f7fc163c3
parent1f0ad7e81303dd238cffef17532eace509319455
tcp: fix MSG_PEEK race check

Commit 162d6a3821 (tcp: Fix recvmsg MSG_PEEK influence of
blocking behavior) lets the loop run longer than the race check
did previously expect, so we need to be more careful with this
check and consider the work we have been doing.

I tried my best to deal with urg hole madness too which happens
here:
if (!sock_flag(sk, SOCK_URGINLINE)) {
++*seq;
...
by using additional offset by one but I certainly have very
little interest in testing that part.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Tested-by: Frans Pop <elendil@planet.nl>
Tested-by: Ian Zimmermann <itz@buug.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c