From: Jarek Poplawski Date: Wed, 27 Aug 2008 09:27:10 +0000 (-0700) Subject: pkt_sched: Fix sch_tree_lock() X-Git-Tag: v3.12-rc1~18439^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe439dd09d3e4da6a44d35df7371b9c6a2661b99;p=kernel%2Fkernel-generic.git pkt_sched: Fix sch_tree_lock() Use new qdisc_root_sleeping_lock() instead of qdisc_root_lock() as sch_tree_lock() because this lock could be used while dev is deactivated, but we never need to use this with noop_qdisc as a root. Signed-off-by: Jarek Poplawski Signed-off-by: David S. Miller --- diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index ef8a7e2..e556962 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -232,12 +232,12 @@ static inline struct net_device *qdisc_dev(struct Qdisc *qdisc) static inline void sch_tree_lock(struct Qdisc *q) { - spin_lock_bh(qdisc_root_lock(q)); + spin_lock_bh(qdisc_root_sleeping_lock(q)); } static inline void sch_tree_unlock(struct Qdisc *q) { - spin_unlock_bh(qdisc_root_lock(q)); + spin_unlock_bh(qdisc_root_sleeping_lock(q)); } #define tcf_tree_lock(tp) sch_tree_lock((tp)->q)