pkt_sched: Fix sch_tree_lock()
Subsystems (2)
PATCH 2/2 pkt_sched: Fix sch_tree_lock()
(apply after: [PATCH 1/2] pkt_sched: Fix gen_estimator locks)
-------------->
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.
---
include/net/sch_generic.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/net/sch_generic.h +2 -2
@@ -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)
David Miller
maintainerFrom: Jarek Poplawski <[email protected]>
Date: Tue, 26 Aug 2008 01:19:28 +0200
Quoted 4 lines
(apply after: [PATCH 1/2]
pkt_sched: Fixgen_estimatorlocks)-------------->
Quoted 8 lines
pkt_sched: Fixsch_tree_lock()Use new
qdisc_root_sleeping_lock()instead ofqdisc_root_lock()assch_tree_lock()because this lock could be used while dev is deactivated, but we never need to use this withnoop_qdiscas a root.Signed-off-by Jarek Poplawski <[email protected]>
Excellent catch, applied, thanks Jarek!