Re: [PATCH v2] tcp: fix regression in urgent data handling
From: Stephan Springl <hidden>
Date: 2012-09-18 08:24:36
Works here on top of 3.5.4, so Tested-by: Stephan Springl <redacted> On Tue, 18 Sep 2012, Eric Dumazet wrote:
quoted hunk ↗ jump to hunk
From: Eric Dumazet <edumazet@google.com> Stephan Springl found that commit 1402d366019fed "tcp: introduce tcp_try_coalesce" introduced a regression for rlogin It turns out problem comes from TCP urgent data handling and a change in behavior in input path. rlogin sends two one-byte packets with URG ptr set, and when next data frame is coalesced, we lack sk_data_ready() calls to wakeup consumer. Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Stephan Springl <redacted> Cc: Alexander Duyck <redacted> --- v2: Changed Stephan Springl email address in changelog/CC net/ipv4/tcp_input.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 6e38c6c..d377f48 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c@@ -4661,7 +4661,7 @@ queue_and_out:if (eaten > 0) kfree_skb_partial(skb, fragstolen); - else if (!sock_flag(sk, SOCK_DEAD)) + if (!sock_flag(sk, SOCK_DEAD)) sk->sk_data_ready(sk, 0); return; }@@ -5556,8 +5556,7 @@ no_ack:#endif if (eaten) kfree_skb_partial(skb, fragstolen); - else - sk->sk_data_ready(sk, 0); + sk->sk_data_ready(sk, 0); return 0; } }
Freundliche Grüße BFW Werner Völk GmbH ppa. Stephan Springl -- Stephan Springl BFW Werner Völk GmbH Tel.: +49 89 82917-452 Energiemesstechnik & Service Fax: +49 89 82917-599 Pasinger Str. 20 - 22 Mail: springl@bfw-online.de D-82166 Gräfelfing Web: http://www.novamess.de Geschäftsführer: Georg F. Völk HRB 44779 Amtsgericht München USt.-ID: DE129301566