diff options
author | Eric Dumazet <edumazet@google.com> | 2024-02-22 10:50:18 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-26 11:46:12 +0000 |
commit | 0ac3fa0c3b365f97c3969f391edf7b44d3bb210d (patch) | |
tree | 3675eb191b5a692fc5d347abca779a9880ae81c9 | |
parent | 22e36ea9f5d7707ae3d64c497d172f4ef735c353 (diff) |
nexthop: allow nexthop_mpath_fill_node() to be called without RTNL
nexthop_mpath_fill_node() will be potentially called
from contexts holding rcu_lock instead of RTNL.
Suggested-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/all/ZdZDWVdjMaQkXBgW@shredder/
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/nexthop.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/nexthop.h b/include/net/nexthop.h index 6647ad509faa..77e99cba60ad 100644 --- a/include/net/nexthop.h +++ b/include/net/nexthop.h @@ -317,7 +317,7 @@ static inline int nexthop_mpath_fill_node(struct sk_buff *skb, struct nexthop *nh, u8 rt_family) { - struct nh_group *nhg = rtnl_dereference(nh->nh_grp); + struct nh_group *nhg = rcu_dereference_rtnl(nh->nh_grp); int i; for (i = 0; i < nhg->num_nh; i++) { |