提交 fe439dd0 编写于 作者: J Jarek Poplawski 提交者: David S. Miller

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: NJarek Poplawski <jarkao2@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f6f9b93f
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册