diff options
author | Eric Dumazet <edumazet@google.com> | 2024-02-22 13:50:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-26 14:46:12 +0300 |
commit | e353ea9ce471331c13edffd5977eadd602d1bb80 (patch) | |
tree | 31a5794e37547a88bfe9d15ad6770be6bdfdf358 /drivers/net/macsec.c | |
parent | 5f6000aa24b939a8853dbc76642ba3cd12765bd8 (diff) | |
download | linux-e353ea9ce471331c13edffd5977eadd602d1bb80.tar.xz |
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>
Diffstat (limited to 'drivers/net/macsec.c')
-rw-r--r-- | drivers/net/macsec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index 7f5426285c61..4b5513c9c2be 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c @@ -3753,7 +3753,7 @@ static void macsec_get_stats64(struct net_device *dev, static int macsec_get_iflink(const struct net_device *dev) { - return macsec_priv(dev)->real_dev->ifindex; + return READ_ONCE(macsec_priv(dev)->real_dev->ifindex); } static const struct net_device_ops macsec_netdev_ops = { |