diff options
author | Eric Dumazet <edumazet@google.com> | 2024-02-22 10:50:10 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-26 11:46:12 +0000 |
commit | 8afc7a78d55de726b2747d7775c54def79509ec5 (patch) | |
tree | 80da701a5118faea6ad635f6309d3c819cf77a1d /include/linux/netdevice.h | |
parent | 4ad268136421dc9813280c55940eca00796420e5 (diff) |
ipv6: prepare inet6_fill_ifinfo() for RCU protection
We want to use RCU protection instead of RTNL
for inet6_fill_ifinfo().
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f07c8374f29c..09023e44db4e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4354,8 +4354,10 @@ static inline bool netif_testing(const struct net_device *dev) */ static inline bool netif_oper_up(const struct net_device *dev) { - return (dev->operstate == IF_OPER_UP || - dev->operstate == IF_OPER_UNKNOWN /* backward compat */); + unsigned int operstate = READ_ONCE(dev->operstate); + + return operstate == IF_OPER_UP || + operstate == IF_OPER_UNKNOWN /* backward compat */; } /** |