mirror of
https://github.com/torvalds/linux
synced 2024-09-16 00:58:07 +00:00
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>
This commit is contained in:
parent
22e36ea9f5
commit
0ac3fa0c3b
|
@ -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++) {
|
||||
|
|
Loading…
Reference in a new issue