tcp: Fix OOB POLLIN avoidance.
authorAlexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
Fri, 19 Mar 2010 03:29:24 +0000 (20:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Mar 2010 03:29:24 +0000 (20:29 -0700)
From: Alexandra.Kossovsky@oktetlabs.ru

Fixes kernel bugzilla #15541

Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c

index 5901010fad55bc969fe509ae8d3fde0aef443b2d..ae16f809e716fbf4c46526c27bd8fb24266c6a1c 100644 (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