Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[NET]: Fix race condition in sk_wait_event().

It is broken, the condition is checked out of socket lock. It is
wonderful the bug survived for so long time.

[ This fixes bugzilla #6233:
race condition in tcp_sendmsg when connection became established ]

Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alexey Kuznetsov and committed by
David S. Miller
265a9285 6f5e6b9e

+1 -1
+1 -1
include/net/sock.h
··· 478 478 rc = __condition; \ 479 479 if (!rc) { \ 480 480 *(__timeo) = schedule_timeout(*(__timeo)); \ 481 - rc = __condition; \ 482 481 } \ 483 482 lock_sock(__sk); \ 483 + rc = __condition; \ 484 484 rc; \ 485 485 }) 486 486