aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>2006-03-17 19:05:43 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-17 19:05:43 -0500
commit265a92856b17524c87da0258ac0d3cec80ae1d35 (patch)
tree31ebb3ef3c990ea64a1b93a1785d2abafe8534ec /include/net/sock.h
parent6f5e6b9e69bf043074a0edabe3d271899c34eb79 (diff)
[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>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 30758035d616..f63d0d56712c 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -478,9 +478,9 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
478 rc = __condition; \ 478 rc = __condition; \
479 if (!rc) { \ 479 if (!rc) { \
480 *(__timeo) = schedule_timeout(*(__timeo)); \ 480 *(__timeo) = schedule_timeout(*(__timeo)); \
481 rc = __condition; \
482 } \ 481 } \
483 lock_sock(__sk); \ 482 lock_sock(__sk); \
483 rc = __condition; \
484 rc; \ 484 rc; \
485}) 485})
486 486