tcp: Fix OOB POLLIN avoidance.

From: Alexandra.Kossovsky@oktetlabs.ru

Fixes kernel bugzilla #15541

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Alexandra Kossovsky 2010-03-18 20:29:24 -07:00 committed by David S. Miller
parent 22001a13d0
commit b634f87522

View File

@ -429,7 +429,7 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
if (tp->urg_seq == tp->copied_seq &&
!sock_flag(sk, SOCK_URGINLINE) &&
tp->urg_data)
target--;
target++;
/* Potential race condition. If read of tp below will
* escape above sk->sk_state, we can be illegally awaken