Commit 3a76e371 authored by Jarek Poplawski's avatar Jarek Poplawski Committed by David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parent 4335cd2d
...@@ -638,9 +638,9 @@ static void notify_and_destroy(struct sk_buff *skb, struct nlmsghdr *n, u32 clid ...@@ -638,9 +638,9 @@ static void notify_and_destroy(struct sk_buff *skb, struct nlmsghdr *n, u32 clid
qdisc_notify(skb, n, clid, old, new); qdisc_notify(skb, n, clid, old, new);
if (old) { if (old) {
spin_lock_bh(&old->q.lock); sch_tree_lock(old);
qdisc_destroy(old); qdisc_destroy(old);
spin_unlock_bh(&old->q.lock); sch_tree_unlock(old);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment