Skip to contentSkip to conversation

pkt_sched: Fix dev_graft_qdisc() locking

PATCH Applied Jarek Poplawski 3 participants 4 messages Aug 25, 2008 – Aug 27, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index 4f9397f..85e078c 100644
@@ -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 */
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jarek Poplawski

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.

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.txt
#2 lore raw
Quoted 7 lines · Herbert Xu
Quoted 6 lines · Jarek Poplawski

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.

Quoted 6 lines
Quoted 1 line

Looks good to me!

BTW, I should've probably mention this lock doesn't probably matter here much, after current precise deactivation.

Thanks,
Jarek P.

maintainer Applied
#3 lore raw
In reply to Herbert Xu

From: Herbert Xu <[email protected]>
Date: Tue, 26 Aug 2008 22:48:13 +1000

Quoted 7 lines
Quoted 6 lines · Jarek Poplawski

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.

Quoted 5 lines
Quoted 1 line

Looks good to me!

Applied, thanks everyone.