Home
last modified time | relevance | path

Searched hist:"377 cb248840907adc407324b4d23f97b3ee70c98" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/net/core/
H A Drtnetlink.cdiff 377cb248840907adc407324b4d23f97b3ee70c98 Thu Aug 10 09:52:57 CDT 2017 Florian Westphal <fw@strlen.de> rtnetlink: use rcu_dereference_raw to silence rcu splat

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>
Signed-off-by: David S. Miller <davem@davemloft.net>