Skip to content

Commit

Permalink
mac80211: Use queue_lock() in ieee80211_ht_agg_queue_remove().
Browse files Browse the repository at this point in the history
qdisc_root_lock() is only %100 safe to use when the RTNL
semaphore is held.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 3, 2008
1 parent 5fb6622 commit 35ed4e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/mac80211/wme.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,14 @@ void ieee80211_ht_agg_queue_remove(struct ieee80211_local *local,
} else {
struct netdev_queue *txq;
spinlock_t *root_lock;
struct Qdisc *q;

txq = netdev_get_tx_queue(local->mdev, agg_queue);
root_lock = qdisc_root_lock(txq->qdisc);
q = rcu_dereference(txq->qdisc);
root_lock = qdisc_lock(q);

spin_lock_bh(root_lock);
qdisc_reset(txq->qdisc);
qdisc_reset(q);
spin_unlock_bh(root_lock);
}
}
Expand Down

0 comments on commit 35ed4e7

Please sign in to comment.