]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sch_ets: make est_qlen_notify() idempotent
authorCong Wang <xiyou.wangcong@gmail.com>
Thu, 3 Apr 2025 21:10:27 +0000 (14:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:20 +0000 (11:05 +0100)
commit52247723c30077277d8760cf9f1c0cef4e5ee743
treef7d087609f240648964468abdfa7a8d57201e070
parent852d27f773a7f470a5c767425240bc722baf5551
sch_ets: make est_qlen_notify() idempotent

[ Upstream commit a7a15f39c682ac4268624da2abdb9114bdde96d5 ]

est_qlen_notify() deletes its class from its active list with
list_del() when qlen is 0, therefore, it is not idempotent and
not friendly to its callers, like fq_codel_dequeue().

Let's make it idempotent to ease qdisc_tree_reduce_backlog() callers'
life. 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>
Link: https://patch.msgid.link/20250403211033.166059-6-xiyou.wangcong@gmail.com
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: d92adacdd8c2 ("net_sched: ets: fix a race in ets_qdisc_change()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_ets.c