aboutsummaryrefslogtreecommitdiff
path: root/net/xfrm
diff options
context:
space:
mode:
authorGravatar Eric Dumazet <edumazet@google.com> 2024-05-03 19:20:59 +0000
committerGravatar Paolo Abeni <pabeni@redhat.com> 2024-05-07 11:14:50 +0200
commit9cf621bd5fcbeadc2804951d13d487e22e95b363 (patch)
tree04a9eea4366aa75be0d1011dbe90e04ded85a3ad /net/xfrm
parentrtnetlink: do not depend on RTNL in rtnl_xdp_prog_skb() (diff)
downloadlinux-9cf621bd5fcbeadc2804951d13d487e22e95b363.tar.gz
linux-9cf621bd5fcbeadc2804951d13d487e22e95b363.tar.bz2
linux-9cf621bd5fcbeadc2804951d13d487e22e95b363.zip
rtnetlink: allow rtnl_fill_link_netnsid() to run under RCU protection
We want to be able to run rtnl_fill_ifinfo() under RCU protection instead of RTNL in the future. All rtnl_link_ops->get_link_net() methods already using dev_net() are ready. I added READ_ONCE() annotations on others. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_interface_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_interface_core.c b/net/xfrm/xfrm_interface_core.c
index 4df5c06e3ece..e50e4bf993fa 100644
--- a/net/xfrm/xfrm_interface_core.c
+++ b/net/xfrm/xfrm_interface_core.c
@@ -926,7 +926,7 @@ static struct net *xfrmi_get_link_net(const struct net_device *dev)
{
struct xfrm_if *xi = netdev_priv(dev);
- return xi->net;
+ return READ_ONCE(xi->net);
}
static const struct nla_policy xfrmi_policy[IFLA_XFRM_MAX + 1] = {