Skip to content

Commit ebc24ae

Browse files
Yunsheng Lingregkh
authored andcommitted
net: sch_generic: fix the missing new qdisc assignment bug
When commit 2fb541c ("net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc") is backported to stable kernel, one assignment is missing, which causes two problems reported by Joakim and Vishwanath, see [1] and [2]. So add the assignment back to fix it. 1. https://www.spinics.net/lists/netdev/msg693916.html 2. https://www.spinics.net/lists/netdev/msg695131.html Fixes: 749cc0b0c7f3 ("net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Tested-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c5cf5c7 commit ebc24ae

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

net/sched/sch_generic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,10 +1127,13 @@ static void dev_deactivate_queue(struct net_device *dev,
11271127
void *_qdisc_default)
11281128
{
11291129
struct Qdisc *qdisc = rtnl_dereference(dev_queue->qdisc);
1130+
struct Qdisc *qdisc_default = _qdisc_default;
11301131

11311132
if (qdisc) {
11321133
if (!(qdisc->flags & TCQ_F_BUILTIN))
11331134
set_bit(__QDISC_STATE_DEACTIVATED, &qdisc->state);
1135+
1136+
rcu_assign_pointer(dev_queue->qdisc, qdisc_default);
11341137
}
11351138
}
11361139

0 commit comments

Comments
 (0)