netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Florian Westphal <fw@strlen.de>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/6] rtnetlink: use rcu_dereference_raw to silence rcu splat
Date: Thu, 10 Aug 2017 18:38:15 +0300	[thread overview]
Message-ID: <20170810153815.GA22889@splinter> (raw)
In-Reply-To: <20170810145302.30391-2-fw@strlen.de>

On Thu, Aug 10, 2017 at 04:52:57PM +0200, Florian Westphal wrote:
> Ido reports a rcu splat in __rtnl_register.
> The splat is correct; as rtnl_register doesn't grab any logs
> and doesn't use rcu locks either.  It has always been like this.
> handler families are not registered in parallel so there are no
> races wrt. the kmalloc ordering.
> 
> The only reason to use rcu_dereference in the first place was to
> avoid sparse from complaining about this.
> 
> Thus this switches to _raw() to not have rcu checks here.
> 
> The alternative is to add rtnl locking to register/unregister,
> however, I don't see a compelling reason to do so as this has been
> lockless for the past twenty years or so.
> 
> Fixes: 6853dd4881 ("rtnetlink: protect handler table with rcu")
> Reported-by: Ido Schimmel <idosch@idosch.org>
> Signed-off-by: Florian Westphal <fw@strlen.de>

Tested-by: Ido Schimmel <idosch@mellanox.com>

Thanks!

  reply	other threads:[~2017-08-10 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 14:52 [PATCH net-next 0/6] rtnetlink: fix initial rtnl pushdown fallout Florian Westphal
2017-08-10 14:52 ` [PATCH net-next 1/6] rtnetlink: use rcu_dereference_raw to silence rcu splat Florian Westphal
2017-08-10 15:38   ` Ido Schimmel [this message]
2017-08-10 14:52 ` [PATCH net-next 2/6] rtnetlink: do not use RTM_GETLINK directly Florian Westphal
2017-08-10 14:52 ` [PATCH net-next 3/6] rtnetlink: switch rtnl_link_get_slave_info_data_size to rcu Florian Westphal
2017-08-10 16:17   ` David Ahern
2017-08-10 14:53 ` [PATCH net-next 4/6] rtnetlink: init handler refcounts to 1 Florian Westphal
2017-08-10 14:53 ` [PATCH net-next 5/6] rtnetlink: fallback to UNSPEC if current family has no doit callback Florian Westphal
2017-08-10 14:53 ` [PATCH net-next 6/6] selftests: add rtnetlink test script Florian Westphal
2017-08-10 16:50 ` [PATCH net-next 0/6] rtnetlink: fix initial rtnl pushdown fallout 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=20170810153815.GA22889@splinter \
    --to=idosch@idosch.org \
    --cc=fw@strlen.de \
    --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).