]> www.infradead.org Git - users/jedix/linux-maple.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)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Feb 2025 00:14:15 +0000 (16:14 -0800)
commit34aef2b0ce3aa4eb4ef2e1f5cad3738d527032f5
tree9b8e93efb8a4b5e57a25928503160025c1d0bfae
parent3c8ffcd248da34fc41e52a46e51505900115fc2a
ipv6: icmp: convert to dev_net_rcu()

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>
net/ipv6/icmp.c