net/sched: sch_cake: drop WARN_ON(1) for malformed packets in ACK filter
Subsystems (4)
Toke Høiland-Jørgensen
maintainerPATCH 1/1 net/sched: sch_cake: drop WARN_ON(1) for malformed packets in ACK filter
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.
--- net/sched/sch_cake.c | 1 - 1 file changed, 1 deletion(-)
net/sched/sch_cake.c +0 -1
@@ -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 ; }
Signature · 1 line
2.55.0
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 6 lines · On Wed, 29 Jul 2026 21:14:16 +0200 you wrote:
The
sch_cakeACK filter parses packets to find the TCP header and filter duplicated ACKs if the flow is backlogged. The parsing code contains aWARN_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 ifpanic_on_warnis set.
Quoted 6 lines
The code already correctly skips the offending packet in the branch that triggers the warning, so the
WARN_ONitself 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html