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: v2.6.27-rc4~39^2~21 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3a76e3716b4e571f5d91a20b6afb412560599083;p=linux-2.6-omap-h63xx.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 c25465e5607..c8dc72e1210 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); } }