pkt_sched: Grab correct lock in notify_and_destroy().
From: Jarek Poplawski <jarkao2@gmail.com>
When we are destroying non-root qdiscs, we need to lock
the root of the qdisc tree not the the qdisc itself.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index c25465e..c8dc72e 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -638,9 +638,9 @@
qdisc_notify(skb, n, clid, old, new);
if (old) {
- spin_lock_bh(&old->q.lock);
+ sch_tree_lock(old);
qdisc_destroy(old);
- spin_unlock_bh(&old->q.lock);
+ sch_tree_unlock(old);
}
}