]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sch_qfq: make qfq_qlen_notify() idempotent
authorCong Wang <xiyou.wangcong@gmail.com>
Thu, 3 Apr 2025 21:10:26 +0000 (14:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:44:04 +0000 (09:44 +0200)
commit36269156033fe6262af0872f6ca539b8afb403c3
tree25fc4312c0dd50bbc5073ecf2719011481f4c32d
parent9030a91235ae4845ec71902c3e0cecfc9ed1f2df
sch_qfq: make qfq_qlen_notify() idempotent

commit 55f9eca4bfe30a15d8656f915922e8c98b7f0728 upstream.

qfq_qlen_notify() always deletes its class from its active list
with list_del_init() _and_ calls qfq_deactivate_agg() when the whole list
becomes empty.

To make it idempotent, just skip everything when it is not in the active
list.

Also change other list_del()'s to list_del_init() just to be extra 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-5-xiyou.wangcong@gmail.com
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/sch_qfq.c