diff options
| author | Todd Kjos <tkjos@google.com> | 2017-03-02 13:53:48 -0800 |
|---|---|---|
| committer | Todd Kjos <tkjos@google.com> | 2017-03-02 13:53:48 -0800 |
| commit | 837de638dc019843efb0f8744e299769af32e004 (patch) | |
| tree | 3f693d421593332edcdf1d877433d31e9f1525de /net/ipv4/tcp.c | |
| parent | f04805218728192d346291c1a0e78cb184142bad (diff) | |
| parent | dd4534d88b93a911983503851ec9441787a4997d (diff) | |
Merge branch 'upstream-linux-4.4.y' into android-4.4
Diffstat (limited to 'net/ipv4/tcp.c')
| -rw-r--r-- | net/ipv4/tcp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index dc173e0d2184..dd2a41b999d4 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -783,6 +783,12 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos, ret = -EAGAIN; break; } + /* if __tcp_splice_read() got nothing while we have + * an skb in receive queue, we do not want to loop. + * This might happen with URG data. + */ + if (!skb_queue_empty(&sk->sk_receive_queue)) + break; sk_wait_data(sk, &timeo, NULL); if (signal_pending(current)) { ret = sock_intr_errno(timeo); |
