From: Jarek Poplawski Date: Mon, 18 Aug 2008 05:02:11 +0000 (-0700) Subject: pkt_sched: Grab correct lock in notify_and_destroy(). X-Git-Tag: firefly_0821_release~18227^2~21 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3a76e3716b4e571f5d91a20b6afb412560599083;p=firefly-linux-kernel-4.4.55.git pkt_sched: Grab correct lock in notify_and_destroy(). From: Jarek Poplawski 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 --- diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index c25465e5607a..c8dc72e12107 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -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); 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); } }