summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-02-22 11:50:08 +0100
committerDavid S. Miller <davem@davemloft.net>2024-02-26 12:46:12 +0100
commite353ea9ce471331c13edffd5977eadd602d1bb80 (patch)
tree31a5794e37547a88bfe9d15ad6770be6bdfdf358 /net/dsa
parentMerge branch 'dp83826' (diff)
downloadlinux-e353ea9ce471331c13edffd5977eadd602d1bb80.tar.xz
linux-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 <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/user.c b/net/dsa/user.c
index 4d53c76a9840..9c42a6edcdc8 100644
--- a/net/dsa/user.c
+++ b/net/dsa/user.c
@@ -352,7 +352,7 @@ void dsa_user_mii_bus_init(struct dsa_switch *ds)
/* user device handling ****************************************************/
static int dsa_user_get_iflink(const struct net_device *dev)
{
- return dsa_user_to_conduit(dev)->ifindex;
+ return READ_ONCE(dsa_user_to_conduit(dev)->ifindex);
}
static int dsa_user_open(struct net_device *dev)