diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-08-29 17:21:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-29 17:27:52 -0400 |
commit | 102396ae65108b026e4e1868e30fa013f45a169e (patch) | |
tree | 1164f9020a3fa47460a2ab72e07c3308be2290ee /net/sched/sch_cbq.c | |
parent | 3cc76caa98b092a8fb3e7b4303c70f847db0651f (diff) |
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>
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r-- | net/sched/sch_cbq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 9b720adedead..8b06fa900482 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -1754,7 +1754,7 @@ static void cbq_put(struct Qdisc *sch, unsigned long arg) | |||
1754 | 1754 | ||
1755 | if (--cl->refcnt == 0) { | 1755 | if (--cl->refcnt == 0) { |
1756 | #ifdef CONFIG_NET_CLS_ACT | 1756 | #ifdef CONFIG_NET_CLS_ACT |
1757 | spinlock_t *root_lock = qdisc_root_lock(sch); | 1757 | spinlock_t *root_lock = qdisc_root_sleeping_lock(sch); |
1758 | struct cbq_sched_data *q = qdisc_priv(sch); | 1758 | struct cbq_sched_data *q = qdisc_priv(sch); |
1759 | 1759 | ||
1760 | spin_lock_bh(root_lock); | 1760 | spin_lock_bh(root_lock); |