Commit 9a068aa
committed
net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class
jira VULN-89289
jira VULN-89290
cve-bf CVE-2025-38477
commit-author Xiang Mei <xmei5@asu.edu>
commit cf074ec
might_sleep could be trigger in the atomic context in qfq_delete_class.
qfq_destroy_class was moved into atomic context locked
by sch_tree_lock to avoid a race condition bug on
qfq_aggregate. However, might_sleep could be triggered by
qfq_destroy_class, which introduced sleeping in atomic context (path:
qfq_destroy_class->qdisc_put->__qdisc_destroy->lockdep_unregister_key
->might_sleep).
Considering the race is on the qfq_aggregate objects, keeping
qfq_rm_from_agg in the lock but moving the left part out can solve
this issue.
Fixes: 5e28d5a ("net/sched: sch_qfq: Fix race condition on qfq_aggregate")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Xiang Mei <xmei5@asu.edu>
Link: https://patch.msgid.link/4a04e0cc-a64b-44e7-9213-2880ed641d77@sabinyo.mountain
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20250717230128.159766-1-xmei5@asu.edu
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
(cherry picked from commit cf074ec)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent c1bf840 commit 9a068aa
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | 540 | | |
544 | 541 | | |
545 | 542 | | |
| |||
558 | 555 | | |
559 | 556 | | |
560 | 557 | | |
561 | | - | |
| 558 | + | |
562 | 559 | | |
563 | 560 | | |
564 | 561 | | |
| 562 | + | |
565 | 563 | | |
566 | 564 | | |
567 | 565 | | |
| |||
1502 | 1500 | | |
1503 | 1501 | | |
1504 | 1502 | | |
| 1503 | + | |
1505 | 1504 | | |
1506 | 1505 | | |
1507 | 1506 | | |
| |||
0 commit comments