Files
linux-stable-mirror/include/net
Cong WangandGreg Kroah-Hartman d38939ebe0 net_sched: Flush gso_skb list too during ->change()
[ Upstream commit 2d3cbfd6d5 ]

Previously, when reducing a qdisc's limit via the ->change() operation, only
the main skb queue was trimmed, potentially leaving packets in the gso_skb
list. This could result in NULL pointer dereference when we only check
sch->limit against sch->q.qlen.

This patch introduces a new helper, qdisc_dequeue_internal(), which ensures
both the gso_skb list and the main queue are properly flushed when trimming
excess packets. All relevant qdiscs (codel, fq, fq_codel, fq_pie, hhf, pie)
are updated to use this helper in their ->change() routines.

Fixes: 76e3cc126b ("codel: Controlled Delay AQM")
Fixes: 4b549a2ef4 ("fq_codel: Fair Queue Codel AQM")
Fixes: afe4fd0624 ("pkt_sched: fq: Fair Queue packet scheduler")
Fixes: ec97ecf1eb ("net: sched: add Flow Queue PIE packet scheduler")
Fixes: 10239edf86 ("net-qdisc-hhf: Heavy-Hitter Filter (HHF) qdisc")
Fixes: d4b36210c2 ("net: pkt_sched: PIE AQM scheme")
Reported-by: Will <willsroot@protonmail.com>
Reported-by: Savy <savy@syst3mfailure.io>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-22 14:10:02 +02:00
..
2022-08-23 10:43:11 +02:00
2025-02-21 13:49:02 +01:00
2022-08-09 22:14:02 -07:00
2024-01-31 16:17:04 -08:00
2025-03-07 16:56:44 +01:00
2024-12-19 18:08:53 +01:00
2025-02-21 13:50:06 +01:00
2023-10-10 22:00:46 +02:00
2023-04-13 16:55:23 +02:00
2023-06-14 11:15:20 +02:00
2025-03-07 16:56:37 +01:00
2025-03-07 16:56:37 +01:00
2024-01-10 17:10:27 +01:00
2023-08-11 12:08:17 +02:00