* [PATCH net] net: remove WARN_ON_ONCE() from sk_mc_loop()
@ 2026-08-04 15:20 Eric Dumazet
2026-08-06 11:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2026-08-04 15:20 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, netdev, eric.dumazet, Eric Dumazet,
syzbot+22c3218a6fa219e47321
sk_mc_loop() can be called for sockets that are neither AF_INET
nor AF_INET6 (e.g. AF_PACKET sockets when sending packets via raw/packet
socket over virtual devices such as VRF or ipvlan).
In such cases, sk_family is not AF_INET/AF_INET6 and sk_mc_loop() falls
through the switch statement and triggers WARN_ON_ONCE(1).
Non-INET sockets do not support IP_MULTICAST_LOOP or IPV6_MULTICAST_LOOP
options, so loopback should default to true without generating a warning.
Fixes: f60e5990d9c1 ("ipv6: protect skb->sk accesses from recursive dereference inside the stack")
Reported-by: syzbot+22c3218a6fa219e47321@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/6a72024c.13623e66.bdc14.0019.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/core/sock.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index ffa73594c13c7557d011730676edc887ec1de5cb..1ad41904db25b48a914640f538760686f40eb100 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -779,7 +779,6 @@ bool sk_mc_loop(const struct sock *sk)
return inet6_test_bit(MC6_LOOP, sk);
#endif
}
- WARN_ON_ONCE(1);
return true;
}
EXPORT_SYMBOL(sk_mc_loop);
--
2.55.0.571.g244d577d93-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: remove WARN_ON_ONCE() from sk_mc_loop()
2026-08-04 15:20 [PATCH net] net: remove WARN_ON_ONCE() from sk_mc_loop() Eric Dumazet
@ 2026-08-06 11:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-06 11:20 UTC (permalink / raw)
To: Eric Dumazet
Cc: davem, kuba, pabeni, horms, netdev, eric.dumazet,
syzbot+22c3218a6fa219e47321
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Tue, 4 Aug 2026 15:20:48 +0000 you wrote:
> sk_mc_loop() can be called for sockets that are neither AF_INET
> nor AF_INET6 (e.g. AF_PACKET sockets when sending packets via raw/packet
> socket over virtual devices such as VRF or ipvlan).
>
> In such cases, sk_family is not AF_INET/AF_INET6 and sk_mc_loop() falls
> through the switch statement and triggers WARN_ON_ONCE(1).
>
> [...]
Here is the summary with links:
- [net] net: remove WARN_ON_ONCE() from sk_mc_loop()
https://git.kernel.org/netdev/net/c/b8a39a09ae4e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-06 11:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 15:20 [PATCH net] net: remove WARN_ON_ONCE() from sk_mc_loop() Eric Dumazet
2026-08-06 11:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox