]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ndisc: ndisc_send_redirect() must use dev_get_by_index_rcu()
authorEric Dumazet <edumazet@google.com>
Fri, 7 Feb 2025 13:58:33 +0000 (13:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:35 +0000 (12:50 +0100)
commit80f70686857e509dc5fb06be3130a586f59516d2
treef3c97777bd2f537aba2303e25d803f77f0945538
parent2052b44cd0a62b6fdbe3371e5ba6029c56c400ca
ndisc: ndisc_send_redirect() must use dev_get_by_index_rcu()

[ Upstream commit 48145a57d4bbe3496e8e4880b23ea6b511e6e519 ]

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 <edumazet@google.com>
Cc: Stephen Suryaputra <ssuryaextr@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250207135841.1948589-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/ndisc.c