Skip to content

Commit

Permalink
pkt_sched: Fix dev_graft_qdisc() locking
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Aug 27, 2008
1 parent c2d4254 commit 666d9bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 666d9bb

Please sign in to comment.