pkt_sched: Fix dev_graft_qdisc() locking
authorJarek Poplawski <jarkao2@gmail.com>
Wed, 27 Aug 2008 09:12:52 +0000 (02:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Aug 2008 09:15:20 +0000 (02:15 -0700)
During dev_graft_qdisc() dev is deactivated, so qdisc_root_lock()
returns wrong lock of noop_qdisc instead of qdisc_sleeping.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_api.c

index e7fb9e0d21b48a2949d846c61b9c775a535bcd24..341d558b6e393ce5b9d64434cb81716365ad956b 100644 (file)
@@ -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 */