Re: [PATCH net] net/sched: sch_choke: fix skb leak on packet ring wrap
From: Paolo Abeni
Date: Fri Dec 04 2026 - 06:19:26 EST
On 11/26/26 15:11, Junyoung Jang wrote:
diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c
index 73d3e673dc7b..92d4f29acf57 100644
--- a/net/sched/sch_choke.c
+++ b/net/sched/sch_choke.c
@@ -268,7 +268,7 @@ static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch,
}
/* Admit new packet */
- if (sch->q.qlen < q->limit) {
+ if (sch->q.qlen < q->limit && choke_len(q) < q->tab_mask) {
Sashiko noted the above causes a behavior change:
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261126141137.1261866-1-graypanda.inzag@xxxxxxxxx
and I think we should avoid it.
/P