pkt_sched: Fix locking of qdisc_root with qdisc_root_sleeping_lock()
Use qdisc_root_sleeping_lock() instead of qdisc_root_lock() where appropriate. The only difference is while dev is deactivated, when currently we can use a sleeping qdisc with the lock of noop_qdisc. This shouldn't be dangerous since after deactivation root lock could be used only by gen_estimator code, but looks wrong anyway. Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
3cc76caa98
commit
102396ae65
@@ -1754,7 +1754,7 @@ static void cbq_put(struct Qdisc *sch, unsigned long arg)
|
||||
|
||||
if (--cl->refcnt == 0) {
|
||||
#ifdef CONFIG_NET_CLS_ACT
|
||||
spinlock_t *root_lock = qdisc_root_lock(sch);
|
||||
spinlock_t *root_lock = qdisc_root_sleeping_lock(sch);
|
||||
struct cbq_sched_data *q = qdisc_priv(sch);
|
||||
|
||||
spin_lock_bh(root_lock);
|
||||
|
Reference in New Issue
Block a user