Skip to content

Commit 9b2b2f0

Browse files
Yunsheng Lingregkh
authored andcommitted
net: sched: fix lockdep_set_class() typo error for sch->seqlock
[ Upstream commit 06f5553 ] According to comment in qdisc_alloc(), sch->seqlock's lockdep class key should be set to qdisc_tx_busylock, due to possible type error, sch->busylock's lockdep class key is set to qdisc_tx_busylock, which is duplicated because sch->busylock's lockdep class key is already set in qdisc_alloc(). So fix it by replacing sch->busylock with sch->seqlock. Fixes: 96009c7 ("sched: replace __QDISC_STATE_RUNNING bit with a spin lock") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent d1f2abe commit 9b2b2f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/sched/sch_generic.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
886886

887887
/* seqlock has the same scope of busylock, for NOLOCK qdisc */
888888
spin_lock_init(&sch->seqlock);
889-
lockdep_set_class(&sch->busylock,
889+
lockdep_set_class(&sch->seqlock,
890890
dev->qdisc_tx_busylock ?: &qdisc_tx_busylock);
891891

892892
seqcount_init(&sch->running);

0 commit comments

Comments
 (0)