[CRIU] [PATCH] tcp: fix retransmission in repair mode

Andrey Wagin avagin at gmail.com
Thu Nov 15 13:43:52 EST 2012


2012/11/15 Eric Dumazet <eric.dumazet at gmail.com>

> On Thu, 2012-11-15 at 18:03 +0400, Andrey Vagin wrote:
> > From: Andrew Vagin <avagin at openvz.org>
> >
> > Currently if a socket was repaired with a few packet in a write queue,
> > a kernel bug may be triggered:
> >
> > kernel BUG at net/ipv4/tcp_output.c:2330!
> > RIP: 0010:[<ffffffff8155784f>] tcp_retransmit_skb+0x5ff/0x610
> >
> > According to the initial realization v3.4-rc2-963-gc0e88ff,
> > all skb-s should look like already posted. This patch fixes code
> > according with this sentence.
> >
> > Here are three points, which were not done in the initial patch:
> > 1. A tcp send head should not be changed
> > 2. Initialize TSO state of a skb
> > 3. Reset the retransmission time
> >
> > This patch moves logic from tcp_sendmsg to tcp_write_xmit. A packet
> > passes the ussual way, but isn't sent to network. This patch solves
> > all described problems and handles tcp_sendpages.
> >
> > Cc: Pavel Emelyanov <xemul at parallels.com>
> > Cc: "David S. Miller" <davem at davemloft.net>
> > Cc: Alexey Kuznetsov <kuznet at ms2.inr.ac.ru>
> > Cc: James Morris <jmorris at namei.org>
> > Cc: Hideaki YOSHIFUJI <yoshfuji at linux-ipv6.org>
> > Cc: Patrick McHardy <kaber at trash.net>
> > Signed-off-by: Andrey Vagin <avagin at openvz.org>
>
> Any chance these tcp repair hacks could be done outside of tcp fast
> path ?
>
>
Hello Eric,

Do you like the attached patch? I would like to mention that
tcp_repair_push is copied code from tcp_write_xmit.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20121115/5842b085/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tcp-fix-retransmission-in-repair-mode-v2.patch
Type: application/octet-stream
Size: 3081 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20121115/5842b085/attachment.obj>


More information about the CRIU mailing list