From: David Miller <davem@davemloft.net>
To: weiwan@google.com
Cc: netdev@vger.kernel.org, edumazet@google.com, kafai@fb.com
Subject: Re: [PATCH net v2] ipv6: add rcu grace period before freeing fib6_node
Date: Sun, 20 Aug 2017 19:59:54 -0700 (PDT) [thread overview]
Message-ID: <20170820.195954.75794556487638223.davem@davemloft.net> (raw)
In-Reply-To: <20170820003408.133176-1-tracywwnj@gmail.com>
From: Wei Wang <weiwan@google.com>
Date: Sat, 19 Aug 2017 17:34:08 -0700
> From: Wei Wang <weiwan@google.com>
>
> We currently keep rt->rt6i_node pointing to the fib6_node for the route.
> And some functions make use of this pointer to dereference the fib6_node
> from rt structure, e.g. rt6_check(). However, as there is neither
> refcount nor rcu taken when dereferencing rt->rt6i_node, it could
> potentially cause crashes as rt->rt6i_node could be set to NULL by other
> CPUs when doing a route deletion.
> This patch introduces an rcu grace period before freeing fib6_node and
> makes sure the functions that dereference it takes rcu_read_lock().
>
> Note: there is no "Fixes" tag because this bug was there in a very
> early stage.
>
> Signed-off-by: Wei Wang <weiwan@google.com>
> Acked-by: Eric Dumazet <edumazet@google.com>
> ---
> v2: removed one extra empty line
Goodness.... where to start.
If this bug has been around forever, why did you make this patch
against net-next instead of net? (I can tell just by looking at
the patch because rt6_free_pcpu() is static in 'net' yet it is
not static in the diff hunk which matches net-next)
And if you made it against net-next, why are you saying "net" in
your subject line instead of "[PATCH net-next v2]"?
Please sort this out properly, and resubmit.
Thank you.
next prev parent reply other threads:[~2017-08-21 2:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-20 0:34 [PATCH net v2] ipv6: add rcu grace period before freeing fib6_node Wei Wang
2017-08-20 4:33 ` Martin KaFai Lau
2017-08-21 2:59 ` David Miller [this message]
2017-08-21 16:19 ` Wei Wang
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=20170820.195954.75794556487638223.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
--cc=weiwan@google.com \
/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).