* [PATCH net] ipv4: use WARN_ON_ONCE() in ip_rt_bug()
@ 2026-05-19 19:32 Eric Dumazet
2026-05-19 22:30 ` David Ahern
2026-05-20 6:39 ` Jiayuan Chen
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2026-05-19 19:32 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, Ido Schimmel, David Ahern, netdev, eric.dumazet,
Eric Dumazet
It turns out ip_rt_bug() can be called more than expected.
syzbot will still panic (because of panic_on_warn=1), but non debug
kernels will no longer die while repeating stack traces on the console.
Fixes: c378a9c019cf ("ipv4: Give backtrace in ip_rt_bug().")
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/ipv4/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index bc1296f0ea69b0705e00e547a0d550129e03326a..3d62d45d84bda986db8b3592c0c7f5c81da3fb7e 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1272,7 +1272,7 @@ static int ip_rt_bug(struct net *net, struct sock *sk, struct sk_buff *skb)
__func__, &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr,
skb->dev ? skb->dev->name : "?");
kfree_skb(skb);
- WARN_ON(1);
+ WARN_ON_ONCE(1);
return 0;
}
--
2.54.0.631.ge1b05301d1-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net] ipv4: use WARN_ON_ONCE() in ip_rt_bug()
2026-05-19 19:32 [PATCH net] ipv4: use WARN_ON_ONCE() in ip_rt_bug() Eric Dumazet
@ 2026-05-19 22:30 ` David Ahern
2026-05-20 6:39 ` Jiayuan Chen
1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2026-05-19 22:30 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, Ido Schimmel, netdev, eric.dumazet
On 5/19/26 1:32 PM, Eric Dumazet wrote:
> It turns out ip_rt_bug() can be called more than expected.
>
> syzbot will still panic (because of panic_on_warn=1), but non debug
> kernels will no longer die while repeating stack traces on the console.
>
> Fixes: c378a9c019cf ("ipv4: Give backtrace in ip_rt_bug().")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> net/ipv4/route.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] ipv4: use WARN_ON_ONCE() in ip_rt_bug()
2026-05-19 19:32 [PATCH net] ipv4: use WARN_ON_ONCE() in ip_rt_bug() Eric Dumazet
2026-05-19 22:30 ` David Ahern
@ 2026-05-20 6:39 ` Jiayuan Chen
1 sibling, 0 replies; 3+ messages in thread
From: Jiayuan Chen @ 2026-05-20 6:39 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, Ido Schimmel, David Ahern, netdev, eric.dumazet
On 5/20/26 3:32 AM, Eric Dumazet wrote:
> It turns out ip_rt_bug() can be called more than expected.
>
> syzbot will still panic (because of panic_on_warn=1), but non debug
> kernels will no longer die while repeating stack traces on the console.
>
> Fixes: c378a9c019cf ("ipv4: Give backtrace in ip_rt_bug().")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> net/ipv4/route.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index bc1296f0ea69b0705e00e547a0d550129e03326a..3d62d45d84bda986db8b3592c0c7f5c81da3fb7e 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -1272,7 +1272,7 @@ static int ip_rt_bug(struct net *net, struct sock *sk, struct sk_buff *skb)
> __func__, &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr,
> skb->dev ? skb->dev->name : "?");
> kfree_skb(skb);
> - WARN_ON(1);
> + WARN_ON_ONCE(1);
> return 0;
> }
>
Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Recently I backported one missing patch to stable because of excessive
ip_rt_bug() prints. So I think it is reasonable to carry a Fixes tag for
backporting.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=da54b3039d436227deebbc202cefea63bd318a38
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-20 6:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 19:32 [PATCH net] ipv4: use WARN_ON_ONCE() in ip_rt_bug() Eric Dumazet
2026-05-19 22:30 ` David Ahern
2026-05-20 6:39 ` Jiayuan Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox