* [PATCH net] tcp-repair: Handle zero-length data put in rcv queue
@ 2012-10-29 15:05 Pavel Emelyanov
2012-11-03 2:02 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Emelyanov @ 2012-10-29 15:05 UTC (permalink / raw)
To: David Miller, Linux Netdev List; +Cc: Giorgos Mavrikas
When sending data into a tcp socket in repair state we should check
for the amount of data being 0 explicitly. Otherwise we'll have an skb
with seq == end_seq in rcv queue, but tcp doesn't expect this to happen
(in particular a warn_on in tcp_recvmsg shoots).
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Reported-by: Giorgos Mavrikas <gmavrikas@gmail.com>
---
>From 8f70f4ea4f509a3772ee7eb5d9d5c2571a86652a Mon Sep 17 00:00:00 2001
From: Pavel Emelyanov <xemul@parallels.com>
Date: Mon, 29 Oct 2012 18:12:41 +0400
Subject: [PATCH] fix for repair queue getback
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
---
net/ipv4/tcp_input.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 432c366..ff5b746 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4529,6 +4529,9 @@ int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size)
struct tcphdr *th;
bool fragstolen;
+ if (size == 0)
+ return 0;
+
skb = alloc_skb(size + sizeof(*th), sk->sk_allocation);
if (!skb)
goto err;
--
1.7.6.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] tcp-repair: Handle zero-length data put in rcv queue
2012-10-29 15:05 [PATCH net] tcp-repair: Handle zero-length data put in rcv queue Pavel Emelyanov
@ 2012-11-03 2:02 ` David Miller
2012-11-03 16:15 ` Pavel Emelyanov
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2012-11-03 2:02 UTC (permalink / raw)
To: xemul; +Cc: netdev, gmavrikas
From: Pavel Emelyanov <xemul@parallels.com>
Date: Mon, 29 Oct 2012 19:05:33 +0400
> When sending data into a tcp socket in repair state we should check
> for the amount of data being 0 explicitly. Otherwise we'll have an skb
> with seq == end_seq in rcv queue, but tcp doesn't expect this to happen
> (in particular a warn_on in tcp_recvmsg shoots).
>
> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
> Reported-by: Giorgos Mavrikas <gmavrikas@gmail.com>
Applied, thanks.
> From 8f70f4ea4f509a3772ee7eb5d9d5c2571a86652a Mon Sep 17 00:00:00 2001
> From: Pavel Emelyanov <xemul@parallels.com>
> Date: Mon, 29 Oct 2012 18:12:41 +0400
> Subject: [PATCH] fix for repair queue getback
>
> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
What is this?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] tcp-repair: Handle zero-length data put in rcv queue
2012-11-03 2:02 ` David Miller
@ 2012-11-03 16:15 ` Pavel Emelyanov
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Emelyanov @ 2012-11-03 16:15 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, gmavrikas@gmail.com
On 11/03/2012 06:02 AM, David Miller wrote:
> From: Pavel Emelyanov <xemul@parallels.com>
> Date: Mon, 29 Oct 2012 19:05:33 +0400
>
>> When sending data into a tcp socket in repair state we should check
>> for the amount of data being 0 explicitly. Otherwise we'll have an skb
>> with seq == end_seq in rcv queue, but tcp doesn't expect this to happen
>> (in particular a warn_on in tcp_recvmsg shoots).
>>
>> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
>> Reported-by: Giorgos Mavrikas <gmavrikas@gmail.com>
>
> Applied, thanks.
>
>> From 8f70f4ea4f509a3772ee7eb5d9d5c2571a86652a Mon Sep 17 00:00:00 2001
>> From: Pavel Emelyanov <xemul@parallels.com>
>> Date: Mon, 29 Oct 2012 18:12:41 +0400
>> Subject: [PATCH] fix for repair queue getback
>>
>> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
>
> What is this?
It's a garbage left after patches rebase and resplit. Sorry for that :(
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-03 16:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-29 15:05 [PATCH net] tcp-repair: Handle zero-length data put in rcv queue Pavel Emelyanov
2012-11-03 2:02 ` David Miller
2012-11-03 16:15 ` Pavel Emelyanov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.