Skip to content

Commit 0ac3fa0

Browse files
edumazetdavem330
authored andcommitted
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>
1 parent 22e36ea commit 0ac3fa0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/net/nexthop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static inline
317317
int nexthop_mpath_fill_node(struct sk_buff *skb, struct nexthop *nh,
318318
u8 rt_family)
319319
{
320-
struct nh_group *nhg = rtnl_dereference(nh->nh_grp);
320+
struct nh_group *nhg = rcu_dereference_rtnl(nh->nh_grp);
321321
int i;
322322

323323
for (i = 0; i < nhg->num_nh; i++) {

0 commit comments

Comments
 (0)