Commit 667d0ca
committed
sch_hfsc: make hfsc_qlen_notify() idempotent
jira VULN-71949
cve CVE-2025-38177
commit-author Cong Wang <xiyou.wangcong@gmail.com>
commit 51eb3b6
hfsc_qlen_notify() is not idempotent either and not friendly
to its callers, like fq_codel_dequeue(). Let's make it idempotent
to ease qdisc_tree_reduce_backlog() callers' life:
1. update_vf() decreases cl->cl_nactive, so we can check whether it is
non-zero before calling it.
2. eltree_remove() always removes RB node cl->el_node, but we can use
RB_EMPTY_NODE() + RB_CLEAR_NODE() to make it safe.
Reported-by: Gerrard Tai <gerrard.tai@starlabs.sg>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250403211033.166059-4-xiyou.wangcong@gmail.com
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
(cherry picked from commit 51eb3b6)
Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>1 parent 4ee2f17 commit 667d0ca
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
213 | 216 | | |
214 | 217 | | |
215 | 218 | | |
| |||
1229 | 1232 | | |
1230 | 1233 | | |
1231 | 1234 | | |
1232 | | - | |
| 1235 | + | |
| 1236 | + | |
1233 | 1237 | | |
1234 | 1238 | | |
1235 | 1239 | | |
| |||
0 commit comments