From: Eric Dumazet <eric.dumazet@gmail.com>
To: Dave Jones <davej@redhat.com>, David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: oops in udpv6_sendmsg
Date: Wed, 17 Apr 2013 09:05:51 -0700 [thread overview]
Message-ID: <1366214751.3205.29.camel@edumazet-glaptop> (raw)
In-Reply-To: <1366208856.3205.23.camel@edumazet-glaptop>
On Wed, 2013-04-17 at 07:27 -0700, Eric Dumazet wrote:
> On Wed, 2013-04-17 at 10:11 -0400, Dave Jones wrote:
> > On Tue, Apr 16, 2013 at 07:02:12PM -0700, Eric Dumazet wrote:
>
> > good news is that with some changes, I was able to make current
> > trinity reproduce this in seconds rather than hours..
> >
> > ./trinity -q -l off -n -c sendmsg -c connect
> >
> > on current tree seems to reliably trigger it for me.
>
> Good new indeed, I got a crash in 2 seconds
>
> (have to reproduce it because I lost the console output)
>
>
Hmm, sk_dst_get() assumes dst are always freed after RCU grace period,
but it seems not the case with IPv6.
We should atomically set dst->__refcnt to -1 before RCU grace period and
final destruction, then sk_dst_get should do something like :
rcu_read_lock();
dst = rcu_dereference(sk->sk_dst_cache);
if (dst && !atomic_add_unless(&dst->__refcnt, 1, -1))
dst = NULL;
rcu_read_unlock();
Ie we should not increment dst->__refcnt if the dst is in dismantle
phase.
next prev parent reply other threads:[~2013-04-17 16:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-29 18:40 oops in udpv6_sendmsg Dave Jones
2013-03-29 18:49 ` Eric Dumazet
2013-04-02 1:23 ` Eric Dumazet
2013-04-11 0:29 ` Dave Jones
2013-04-17 1:02 ` Dave Jones
2013-04-17 2:02 ` Eric Dumazet
2013-04-17 14:11 ` Dave Jones
2013-04-17 14:27 ` Eric Dumazet
2013-04-17 16:05 ` Eric Dumazet [this message]
2013-06-25 21:28 ` Hannes Frederic Sowa
2013-06-26 9:22 ` Eric Dumazet
2013-06-26 9:29 ` Eric Dumazet
2013-06-26 11:15 ` Eric Dumazet
2013-06-26 13:07 ` Hannes Frederic Sowa
2013-06-26 22:15 ` 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=1366214751.3205.29.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davej@redhat.com \
--cc=davem@davemloft.net \
--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