Netdev List
 help / color / mirror / Atom feed
* [PATCH net] net/sched: sch_cake: drop WARN_ON(1) for malformed packets in ACK filter
@ 2026-07-29 19:14 Toke Høiland-Jørgensen
  2026-08-04  1:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Toke Høiland-Jørgensen @ 2026-07-29 19:14 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen, Jamal Hadi Salim, Jiri Pirko,
	David S. Miller
  Cc: Zhiling Zou, Ren Wei, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, cake, netdev

The sch_cake ACK filter parses packets to find the TCP header and filter
duplicated ACKs if the flow is backlogged. The parsing code contains a
WARN_ON(1) which can be triggered by a malformed IP header in certain
cases. Depending on the system configuration, this leads either to
either spamming dmesg with warnings, or a panic if panic_on_warn is set.

The code already correctly skips the offending packet in the branch that
triggers the warning, so the WARN_ON itself doesn't really serve any
purpose. So just drop it altogether to avoid the inconvenient side
effects.

Fixes: 8b7138814f29 ("sch_cake: Add optional ACK filter")
Reported-by: Zhiling Zou <zhilinz@nebusec.ai>
Reported-by: Ren Wei <enjou1224z@gmail.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
---
 net/sched/sch_cake.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index f64be54ead49..f25f60978631 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -1287,7 +1287,6 @@ static struct sk_buff *cake_ack_filter(struct cake_sched_data *q,
 
 			seglen = ipv6_payload_len(skb, ipv6h_check);
 		} else {
-			WARN_ON(1);  /* shouldn't happen */
 			continue;
 		}
 
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net/sched: sch_cake: drop WARN_ON(1) for malformed packets in ACK filter
  2026-07-29 19:14 [PATCH net] net/sched: sch_cake: drop WARN_ON(1) for malformed packets in ACK filter Toke Høiland-Jørgensen
@ 2026-08-04  1:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-04  1:50 UTC (permalink / raw)
  To: =?utf-8?b?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2VuIDx0b2tlQHRva2UuZGs+?=
  Cc: jhs, jiri, davem, zhilinz, enjou1224z, edumazet, kuba, pabeni,
	horms, cake, netdev

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 29 Jul 2026 21:14:16 +0200 you wrote:
> The sch_cake ACK filter parses packets to find the TCP header and filter
> duplicated ACKs if the flow is backlogged. The parsing code contains a
> WARN_ON(1) which can be triggered by a malformed IP header in certain
> cases. Depending on the system configuration, this leads either to
> either spamming dmesg with warnings, or a panic if panic_on_warn is set.
> 
> The code already correctly skips the offending packet in the branch that
> triggers the warning, so the WARN_ON itself doesn't really serve any
> purpose. So just drop it altogether to avoid the inconvenient side
> effects.
> 
> [...]

Here is the summary with links:
  - [net] net/sched: sch_cake: drop WARN_ON(1) for malformed packets in ACK filter
    https://git.kernel.org/netdev/net/c/2a33516f9ef5

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-04  1:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 19:14 [PATCH net] net/sched: sch_cake: drop WARN_ON(1) for malformed packets in ACK filter Toke Høiland-Jørgensen
2026-08-04  1:50 ` 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