diff options
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 b751abc56935..d44a6989e76d 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -773,6 +773,12 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos, | |||
773 | ret = -EAGAIN; | 773 | ret = -EAGAIN; |
774 | break; | 774 | break; |
775 | } | 775 | } |
776 | /* if __tcp_splice_read() got nothing while we have | ||
777 | * an skb in receive queue, we do not want to loop. | ||
778 | * This might happen with URG data. | ||
779 | */ | ||
780 | if (!skb_queue_empty(&sk->sk_receive_queue)) | ||
781 | break; | ||
776 | sk_wait_data(sk, &timeo, NULL); | 782 | sk_wait_data(sk, &timeo, NULL); |
777 | if (signal_pending(current)) { | 783 | if (signal_pending(current)) { |
778 | ret = sock_intr_errno(timeo); | 784 | ret = sock_intr_errno(timeo); |