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-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a76e3716b4e571f5d91a20b6afb412560599083;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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); } }