From: Thomas Graf <tgraf@suug.ch>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, foraker1@llnl.gov
Subject: Re: [PATCH net] tcp: Don't collapse if resulting skb could overflow skb->csum_start
Date: Thu, 28 Feb 2013 19:23:51 +0000 [thread overview]
Message-ID: <20130228192351.GE7558@casper.infradead.org> (raw)
In-Reply-To: <1362073254.15793.43.camel@edumazet-glaptop>
On 02/28/13 at 09:40am, Eric Dumazet wrote:
> On Thu, 2013-02-28 at 09:35 -0800, Eric Dumazet wrote:
> > This had a followup with 22b4a4f22da4
> > (tcp: fix retransmit of partially acked frames)
> >
> > I also wonder if there is not another similar potential problem in
> > __tcp_retransmit_skb) after call to
> >
> > tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)
> >
> > csum_start can overflow again because of MAX_TCP_HEADER headroom
> > reserve.
> >
> > So maybe we should limit TCP MTU to (64K - MAX_TCP_HEADER)
> >
>
> Or adapt the test at line 2390 in net/ipv4/tcp_output.c
>
> to force in the case there could be an overflow a :
>
> struct sk_buff *nskb = __pskb_copy()
>
> So that we have a new skb with minimal headroom.
I would favour the __pskb_copy() variant as that would be more
generic. I'll redo the patch.
prev parent reply other threads:[~2013-02-28 19:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 10:26 [PATCH net] tcp: Don't collapse if resulting skb could overflow skb->csum_start Thomas Graf
2013-02-28 16:18 ` Eric Dumazet
2013-02-28 16:45 ` Thomas Graf
2013-02-28 17:35 ` Eric Dumazet
2013-02-28 17:40 ` Eric Dumazet
2013-02-28 19:23 ` Thomas Graf [this message]
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=20130228192351.GE7558@casper.infradead.org \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=foraker1@llnl.gov \
--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).