From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexander Beregalov <a.beregalov@gmail.com>,
David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Marc MERLIN <marc@merlins.org>
Subject: [PATCH] tcp: fix retransmit of partially acked frames
Date: Wed, 18 Apr 2012 22:14:23 +0200 [thread overview]
Message-ID: <1334780063.2472.352.camel@edumazet-glaptop> (raw)
In-Reply-To: <1334734196.2472.91.camel@edumazet-glaptop>
From: Eric Dumazet <edumazet@google.com>
Alexander Beregalov reported skb_over_panic errors and provided stack
trace.
I occurs commit a21d45726aca (tcp: avoid order-1 allocations on wifi and
tx path) added a regression, when a retransmit is done after a partial
ACK.
tcp_retransmit_skb() tries to aggregate several frames if the first one
has enough available room to hold the following ones payload. This is
controlled by /proc/sys/net/ipv4/tcp_retrans_collapse tunable (default :
enabled)
Problem is we must make sure _pskb_trim_head() doesnt fool
skb_availroom() when pulling some bytes from skb (this pull is done when
receiver ACK part of the frame).
Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Marc MERLIN <marc@merlins.org>
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/ipv4/tcp_output.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 376b2cf..7ac6423 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1096,6 +1096,7 @@ static void __pskb_trim_head(struct sk_buff *skb, int len)
eat = min_t(int, len, skb_headlen(skb));
if (eat) {
__skb_pull(skb, eat);
+ skb->avail_size -= eat;
len -= eat;
if (!len)
return;
next prev parent reply other threads:[~2012-04-18 20:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-15 12:24 3.4.0-rc2: skb_put() -> skb_over_panic Alexander Beregalov
2012-04-15 15:16 ` Eric Dumazet
2012-04-17 20:15 ` Alexander Beregalov
2012-04-17 20:45 ` Eric Dumazet
2012-04-17 20:47 ` David Miller
2012-04-17 20:53 ` Eric Dumazet
2012-04-18 6:37 ` Alexander Beregalov
2012-04-18 7:29 ` Eric Dumazet
2012-04-18 7:54 ` Alexander Beregalov
2012-04-18 20:14 ` Eric Dumazet [this message]
2012-04-18 20:54 ` [PATCH] tcp: fix retransmit of partially acked frames David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334780063.2472.352.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=a.beregalov@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=marc@merlins.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).