diff options
author | Eric Dumazet <edumazet@google.com> | 2024-05-03 22:20:59 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-05-07 12:14:50 +0300 |
commit | 9cf621bd5fcbeadc2804951d13d487e22e95b363 (patch) | |
tree | 04a9eea4366aa75be0d1011dbe90e04ded85a3ad /drivers/net/ppp | |
parent | 979aad40da9217d5e907ee4ad7c7f0dc555944a7 (diff) | |
download | linux-9cf621bd5fcbeadc2804951d13d487e22e95b363.tar.xz |
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 'drivers/net/ppp')
-rw-r--r-- | drivers/net/ppp/ppp_generic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index fe380fe196e7..0a65b6d690fe 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -1357,7 +1357,7 @@ static struct net *ppp_nl_get_link_net(const struct net_device *dev) { struct ppp *ppp = netdev_priv(dev); - return ppp->ppp_net; + return READ_ONCE(ppp->ppp_net); } static struct rtnl_link_ops ppp_link_ops __read_mostly = { |