]> www.infradead.org Git - users/willy/pagecache.git/commit
ipv6: mcast: add RCU protection to mld_newpack()
authorEric Dumazet <edumazet@google.com>
Wed, 12 Feb 2025 14:10:21 +0000 (14:10 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 13 Feb 2025 16:37:21 +0000 (08:37 -0800)
commita527750d877fd334de87eef81f1cb5f0f0ca3373
tree0f608fb0e2f6a8221831a1eeb06e5e176b44ab83
parent5bef3ac184b5626ea62385d6b82a1992b89d7940
ipv6: mcast: add RCU protection to mld_newpack()

mld_newpack() can be called without RTNL or RCU being held.

Note that we no longer can use sock_alloc_send_skb() because
ipv6.igmp_sk uses GFP_KERNEL allocations which can sleep.

Instead use alloc_skb() and charge the net->ipv6.igmp_sk
socket under RCU protection.

Fixes: b8ad0cbc58f7 ("[NETNS][IPV6] mcast - handle several network namespace")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250212141021.1663666-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/mcast.c