diff options
| author | Eric Dumazet <[email protected]> | 2025-02-07 13:58:33 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-02-11 02:09:09 +0000 |
| commit | 48145a57d4bbe3496e8e4880b23ea6b511e6e519 (patch) | |
| tree | 748642bf3508757ff03806f0c62751c21cdcc3f6 | |
| parent | net: stmmac: Apply new page pool parameters when SPH is enabled (diff) | |
| download | kernel-48145a57d4bbe3496e8e4880b23ea6b511e6e519.tar.gz kernel-48145a57d4bbe3496e8e4880b23ea6b511e6e519.zip | |
ndisc: ndisc_send_redirect() must use dev_get_by_index_rcu()
ndisc_send_redirect() is called under RCU protection, not RTNL.
It must use dev_get_by_index_rcu() instead of __dev_get_by_index()
Fixes: 2f17becfbea5 ("vrf: check the original netdevice for generating redirect")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Stephen Suryaputra <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
| -rw-r--r-- | net/ipv6/ndisc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index d044c67019de..264b10a94757 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1694,7 +1694,7 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target) bool ret; if (netif_is_l3_master(skb->dev)) { - dev = __dev_get_by_index(dev_net(skb->dev), IPCB(skb)->iif); + dev = dev_get_by_index_rcu(dev_net(skb->dev), IPCB(skb)->iif); if (!dev) return; } |
