rtnetlink: prepare nla_put_iflink() to run under RCU
We want to be able to run rtnl_fill_ifinfo() under RCU protection instead of RTNL in the future. This patch prepares dev_get_iflink() and nla_put_iflink() to run either with RTNL or RCU held. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
5f6000aa24
commit
e353ea9ce4
@ -93,7 +93,7 @@ static int lowpan_neigh_construct(struct net_device *dev, struct neighbour *n)
|
||||
|
||||
static int lowpan_get_iflink(const struct net_device *dev)
|
||||
{
|
||||
return lowpan_802154_dev(dev)->wdev->ifindex;
|
||||
return READ_ONCE(lowpan_802154_dev(dev)->wdev->ifindex);
|
||||
}
|
||||
|
||||
static const struct net_device_ops lowpan_netdev_ops = {
|
||||
|
Reference in New Issue
Block a user