diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 20:28:35 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 20:28:35 +0200 |
commit | 9bd7de51ee8537094656149eaf45338cadb7d7d4 (patch) | |
tree | a691987319dfcdb07de2bce619746f88d26882c4 /net/ipv4/tcp.c | |
parent | e4b636366c00738b9609cda307014d71b1225b7f (diff) | |
parent | 6a44587ee716ac911082cbdec766e5b3f051c071 (diff) | |
download | linux-3.10-9bd7de51ee8537094656149eaf45338cadb7d7d4.tar.gz linux-3.10-9bd7de51ee8537094656149eaf45338cadb7d7d4.tar.bz2 linux-3.10-9bd7de51ee8537094656149eaf45338cadb7d7d4.zip |
Merge branch 'master' into for-2.6.31
Conflicts:
drivers/ide/ide-io.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 1d7f49c6f0c..7a0f0b27bf1 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1321,6 +1321,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, struct task_struct *user_recv = NULL; int copied_early = 0; struct sk_buff *skb; + u32 urg_hole = 0; lock_sock(sk); @@ -1532,7 +1533,8 @@ do_prequeue: } } } - if ((flags & MSG_PEEK) && peek_seq != tp->copied_seq) { + if ((flags & MSG_PEEK) && + (peek_seq - copied - urg_hole != tp->copied_seq)) { if (net_ratelimit()) printk(KERN_DEBUG "TCP(%s:%d): Application bug, race in MSG_PEEK.\n", current->comm, task_pid_nr(current)); @@ -1553,6 +1555,7 @@ do_prequeue: if (!urg_offset) { if (!sock_flag(sk, SOCK_URGINLINE)) { ++*seq; + urg_hole++; offset++; used--; if (!used) |