diff options
| author | Eric Dumazet <[email protected]> | 2024-02-22 10:50:08 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2024-02-26 11:46:12 +0000 |
| commit | e353ea9ce471331c13edffd5977eadd602d1bb80 (patch) | |
| tree | 31a5794e37547a88bfe9d15ad6770be6bdfdf358 /drivers/net/netkit.c | |
| parent | Merge branch 'dp83826' (diff) | |
| download | kernel-e353ea9ce471331c13edffd5977eadd602d1bb80.tar.gz kernel-e353ea9ce471331c13edffd5977eadd602d1bb80.zip | |
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/netkit.c')
| -rw-r--r-- | drivers/net/netkit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/netkit.c b/drivers/net/netkit.c index 39171380ccf2..a4d2e76a8d58 100644 --- a/drivers/net/netkit.c +++ b/drivers/net/netkit.c @@ -145,7 +145,7 @@ static int netkit_get_iflink(const struct net_device *dev) rcu_read_lock(); peer = rcu_dereference(nk->peer); if (peer) - iflink = peer->ifindex; + iflink = READ_ONCE(peer->ifindex); rcu_read_unlock(); return iflink; } |
