Skip to content

Commit d837fbe

Browse files
jhsmtkuba-moo
authored andcommitted
net/sched: qfq: Use cl_is_active to determine whether class is active in qfq_rm_from_ag
This is more of a preventive patch to make the code more consistent and to prevent possible exploits that employ child qlen manipulations on qfq. use cl_is_active instead of relying on the child qdisc's qlen to determine class activation. Fixes: 462dbc9 ("pkt_sched: QFQ Plus: fair-queueing service at DRR cost") Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Link: https://patch.msgid.link/20260114160243.913069-3-jhs@mojatatu.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 50da4b9 commit d837fbe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/sched/sch_qfq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static void qfq_rm_from_agg(struct qfq_sched *q, struct qfq_class *cl)
373373
/* Deschedule class and remove it from its parent aggregate. */
374374
static void qfq_deact_rm_from_agg(struct qfq_sched *q, struct qfq_class *cl)
375375
{
376-
if (cl->qdisc->q.qlen > 0) /* class is active */
376+
if (cl_is_active(cl)) /* class is active */
377377
qfq_deactivate_class(q, cl);
378378

379379
qfq_rm_from_agg(q, cl);

0 commit comments

Comments
 (0)