pkt_sched: Fix dev_graft_qdisc() locking
Subsystems (3)
PATCH 1/1 pkt_sched: Fix dev_graft_qdisc() locking
pkt_sched: Fix dev_graft_qdisc() locking
During dev_graft_qdisc() dev is deactivated, so qdisc_root_lock() returns wrong lock of noop_qdisc instead of qdisc_sleeping.
---
net/sched/sch_api.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/sched/sch_api.c +1 -1
@@ -624,7 +624,7 @@ static struct Qdisc *dev_graft_qdisc(struct netdev_queue *dev_queue,struct Qdisc *oqdisc = dev_queue->qdisc_sleeping;spinlock_t *root_lock; - root_lock =qdisc_root_lock (oqdisc); + root_lock =qdisc_lock (oqdisc);spin_lock_bh (root_lock);/* Prune old scheduler */
Quoted 7 lines · Jarek Poplawski
pkt_sched: Fixdev_graft_qdisc()lockingDuring
dev_graft_qdisc()dev is deactivated, soqdisc_root_lock()returns wrong lock ofnoop_qdiscinstead ofqdisc_sleeping.Signed-off-by Jarek Poplawski <[email protected]>
Looks good to me!
Thanks,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtQuoted 7 lines · Herbert Xu
Quoted 6 lines · Jarek Poplawski
pkt_sched: Fixdev_graft_qdisc()lockingDuring
dev_graft_qdisc()dev is deactivated, soqdisc_root_lock()returns wrong lock ofnoop_qdiscinstead ofqdisc_sleeping.
Quoted 6 lines
Quoted 1 line
Signed-off-by Jarek Poplawski <[email protected]>Looks good to me!
Acked-by Herbert Xu <[email protected]>
BTW, I should've probably mention this lock doesn't probably matter here much, after current precise deactivation.
Thanks,
Jarek P.
From: Herbert Xu <[email protected]>
Date: Tue, 26 Aug 2008 22:48:13 +1000
Quoted 7 lines
Quoted 6 lines · Jarek Poplawski
pkt_sched: Fixdev_graft_qdisc()lockingDuring
dev_graft_qdisc()dev is deactivated, soqdisc_root_lock()returns wrong lock ofnoop_qdiscinstead ofqdisc_sleeping.
Quoted 5 lines
Quoted 1 line
Signed-off-by Jarek Poplawski <[email protected]>Looks good to me!
Acked-by Herbert Xu <[email protected]>
Applied, thanks everyone.