]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv6: icmp: convert to dev_net_rcu()
authorEric Dumazet <edumazet@google.com>
Wed, 5 Feb 2025 15:51:19 +0000 (15:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 13:01:42 +0000 (14:01 +0100)
commit653bb5225cd4175d4e9f67b14823f4de9fad735e
tree95c8f8535bd0cf6f858c9e44271bb0c8b13cb69f
parent713a40c892f40300d63691d9f85b2a23b48fe1e8
ipv6: icmp: convert to dev_net_rcu()

[ Upstream commit 34aef2b0ce3aa4eb4ef2e1f5cad3738d527032f5 ]

icmp6_send() must acquire rcu_read_lock() sooner to ensure
the dev_net() call done from a safe context.

Other ICMPv6 uses of dev_net() seem safe, change them to
dev_net_rcu() to get LOCKDEP support to catch bugs.

Fixes: 9a43b709a230 ("[NETNS][IPV6] icmp6 - make icmpv6_socket per namespace")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250205155120.1676781-12-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/icmp.c