From: Artem Savkov <artem.savkov@gmail.com>
To: Neal Cardwell <ncardwell@google.com>
Cc: David Miller <davem@davemloft.net>,
eric.dumazet@gmail.com, akpm@linux-foundation.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] net: tcp: ipv6_mapped needs sk_rx_dst_set method
Date: Sun, 19 Aug 2012 12:11:38 +0400 [thread overview]
Message-ID: <20120819081137.GA4110@thinkpad.lan> (raw)
In-Reply-To: <CADVnQyn-aDMDdb_nfFyZPtmnKkuFtjwfSNWudnhMdYZz7Ddh7g@mail.gmail.com>
On Sun, Aug 19, 2012 at 12:06:33AM -0400, Neal Cardwell wrote:
> On Sat, Aug 18, 2012 at 9:06 AM, Artem Savkov <artem.savkov@gmail.com> wrote:
> > [ 1699.195040] EIP is at inet6_sk_rx_dst_set+0x40/0xa0
> ...
> > [ 1699.198736] [<c15662a1>] tcp_create_openreq_child+0x41/0x4e0
> > [ 1699.198884] [<c1563b54>] tcp_v4_syn_recv_sock+0x34/0x330
> > [ 1699.199032] [<c15d162e>] tcp_v6_syn_recv_sock+0x3fe/0x660
> ...
> > [ 1699.242913] EIP: [<c15d11d0>] inet6_sk_rx_dst_set+0x40/0xa0 SS:ESP 0068:f540dce0
> > [ 1699.245945] CR2: 0000000000000016
> > [ 1699.280708] ---[ end trace 3fb05aeec95e7238 ]---
> > [ 1699.280806] Kernel panic - not syncing: Fatal exception in interrupt
> > [ 1699.284674] panic occurred, switching back to text console
> Thanks for the detailed report!
>
> I don't think that particular fix is kosher, since this basically
> changes the address family ops of the parent listening socket ('sk'
> here).The parent listening socket needs to keep its IPv6 af_ops so its
> IPv6 children can get the right af_ops.
Indeed, my approach breaks ipv6 after first mapped connection.
> We should probably either: (a) make sure the af_ops of the child
> socket are set correctly earlier, or (b) not use dynamic dispatch
> through the af_ops within tcp_create_openreq_child(), and just do the
> sk_rx_dst_set a tiny bit later. I've sent out a patch for approach (b)
> here, since it's simpler:
>
> http://patchwork.ozlabs.org/patch/178525/
>
> I've verified that IPv4, IPv6, and IPv4-mapped-IPv6 connections work
> for me with this patch. But if you could test it as well, that would
> be great.
I've tested it and can confirm that all three connection types work.
Thank you for the patch and explanation.
--
Kind regards,
Artem
next prev parent reply other threads:[~2012-08-19 8:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 15:09 [PATCH] net: ipv6: fix TCP early demux Eric Dumazet
2012-08-06 20:33 ` David Miller
2012-08-09 23:03 ` Andrew Morton
2012-08-09 23:58 ` Eric Dumazet
2012-08-10 0:11 ` [PATCH] net: tcp: ipv6_mapped needs sk_rx_dst_set method Eric Dumazet
2012-08-10 4:06 ` David Miller
2012-08-18 13:06 ` Artem Savkov
2012-08-19 4:06 ` Neal Cardwell
2012-08-19 8:11 ` Artem Savkov [this message]
2012-08-19 10:48 ` Eric Dumazet
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=20120819081137.GA4110@thinkpad.lan \
--to=artem.savkov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=ncardwell@google.com \
--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).