Browse Source

tcp: Fix OOB POLLIN avoidance.

From: Alexandra.Kossovsky@oktetlabs.ru

Fixes kernel bugzilla #15541

Signed-off-by: David S. Miller <davem@davemloft.net>
Alexandra Kossovsky 15 years ago
parent
commit
b634f87522
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/ipv4/tcp.c

+ 1 - 1
net/ipv4/tcp.c

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