]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
net_sched: fix order of queue length updates in qdisc_replace()
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Sat, 19 Aug 2017 12:37:07 +0000 (15:37 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 19 Sep 2017 09:07:04 +0000 (11:07 +0200)
commit988446405301f9fd72799c4364d4ca4a742364c1
treed3b9544fc77dbc8ff6bec1a1fc9c2edd4b9d45d8
parent9889f34005b6f6c03e7aa9f7d636b9c41acf5e76
net_sched: fix order of queue length updates in qdisc_replace()

BugLink: http://bugs.launchpad.net/bugs/1714298
[ Upstream commit 68a66d149a8c78ec6720f268597302883e48e9fa ]

This important to call qdisc_tree_reduce_backlog() after changing queue
length. Parent qdisc should deactivate class in ->qlen_notify() called from
qdisc_tree_reduce_backlog() but this happens only if qdisc->q.qlen in zero.

Missed class deactivations leads to crashes/warnings at picking packets
from empty qdisc and corrupting state at reactivating this class in future.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 86a7996cc8a0 ("net_sched: introduce qdisc_replace() helper")
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
include/net/sch_generic.h