]> git.hungrycats.org Git - linux/commitdiff
tcp: Fix OOB POLLIN avoidance.
authorAlexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
Fri, 19 Mar 2010 03:29:24 +0000 (20:29 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 23:02:11 +0000 (16:02 -0700)
[ Upstream commit b634f87522dff87712df8bda2a6c9061954d552a ]

From: Alexandra.Kossovsky@oktetlabs.ru

Fixes kernel bugzilla #15541

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/tcp.c

index 225df28633ca43990f0b4fd08776c533829bb242..564a0f87cd66ef083310e0145ea621f77c4ce157 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