Netdev List
 help / color / mirror / Atom feed
From: Jiayuan Chen <jiayuan.chen@linux.dev>
To: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>, Ido Schimmel <idosch@nvidia.com>,
	David Ahern <dsahern@kernel.org>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net] ipv4: use WARN_ON_ONCE() in ip_rt_bug()
Date: Wed, 20 May 2026 14:39:20 +0800	[thread overview]
Message-ID: <7cf35e75-28a6-40b4-86d5-82b0aa9773bd@linux.dev> (raw)
In-Reply-To: <20260519193248.4018872-1-edumazet@google.com>


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


      parent reply	other threads:[~2026-05-20  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cf35e75-28a6-40b4-86d5-82b0aa9773bd@linux.dev \
    --to=jiayuan.chen@linux.dev \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox