Skip to content

Commit

Permalink
[NET]: Fix race condition in sk_wait_event().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Kuznetsov authored and David S. Miller committed Mar 18, 2006
1 parent 6f5e6b9 commit 265a928
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,9 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
rc = __condition; \
if (!rc) { \
*(__timeo) = schedule_timeout(*(__timeo)); \
rc = __condition; \
} \
lock_sock(__sk); \
rc = __condition; \
rc; \
})

Expand Down

0 comments on commit 265a928

Please sign in to comment.