Commit d3336f74 authored by Cong Wang's avatar Cong Wang Committed by Greg Kroah-Hartman
Browse files

net_sched: Flush gso_skb list too during ->change()



[ Upstream commit 2d3cbfd6 ]

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: 76e3cc12 ("codel: Controlled Delay AQM")
Fixes: 4b549a2e ("fq_codel: Fair Queue Codel AQM")
Fixes: afe4fd06 ("pkt_sched: fq: Fair Queue packet scheduler")
Fixes: ec97ecf1 ("net: sched: add Flow Queue PIE packet scheduler")
Fixes: 10239edf ("net-qdisc-hhf: Heavy-Hitter Filter (HHF) qdisc")
Fixes: d4b36210 ("net: pkt_sched: PIE AQM scheme")
Reported-by: default avatarWill <willsroot@protonmail.com>
Reported-by: default avatarSavy <savy@syst3mfailure.io>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 894b06a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment