提交 bc3c8fe3 编写于 作者: F Florian Westphal 提交者: Jakub Kicinski

plip: avoid rcu debug splat

WARNING: suspicious RCU usage
5.2.0-rc2-00605-g2638eb8b #1 Not tainted
drivers/net/plip/plip.c:1110 suspicious rcu_dereference_check() usage!

plip_open is called with RTNL held, switch to the correct helper.

Fixes: 2638eb8b ("net: ipv4: provide __rcu annotation for ifa_list")
Reported-by: Nkernel test robot <oliver.sang@intel.com>
Signed-off-by: NFlorian Westphal <fw@strlen.de>
Link: https://lore.kernel.org/r/20220807115304.13257-1-fw@strlen.deSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 1b7680c6
...@@ -1111,7 +1111,7 @@ plip_open(struct net_device *dev) ...@@ -1111,7 +1111,7 @@ plip_open(struct net_device *dev)
/* Any address will do - we take the first. We already /* Any address will do - we take the first. We already
have the first two bytes filled with 0xfc, from have the first two bytes filled with 0xfc, from
plip_init_dev(). */ plip_init_dev(). */
const struct in_ifaddr *ifa = rcu_dereference(in_dev->ifa_list); const struct in_ifaddr *ifa = rtnl_dereference(in_dev->ifa_list);
if (ifa != NULL) { if (ifa != NULL) {
dev_addr_mod(dev, 2, &ifa->ifa_local, 4); dev_addr_mod(dev, 2, &ifa->ifa_local, 4);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册