net: sched: tbf: don't call qdisc_put() while holding tree lock
authorZhengchao Shao <shaozhengchao@huawei.com>
Fri, 26 Aug 2022 01:39:30 +0000 (09:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Sep 2022 10:28:02 +0000 (12:28 +0200)
commitce881ddbdc028fb1988b66e40e45ca0529c23b46
tree1ed4bb8df11248d93c3a34a8249ecc9e6d82850a
parentd6ec2f711c945ee969be5709aa23e40ae4c57368
net: sched: tbf: don't call qdisc_put() while holding tree lock

[ Upstream commit b05972f01e7d30419987a1f221b5593668fd6448 ]

The issue is the same to commit c2999f7fb05b ("net: sched: multiq: don't
call qdisc_put() while holding tree lock"). Qdiscs call qdisc_put() while
holding sch tree spinlock, which results sleeping-while-atomic BUG.

Fixes: c266f64dbfa2 ("net: sched: protect block state with mutex")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20220826013930.340121-1-shaozhengchao@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_tbf.c