Message ID | 1467201634-11060-1-git-send-email-michal.kazior@tieto.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
On Wed, 2016-06-29 at 14:00 +0200, Michal Kazior wrote: > Some lockdep assertions were not fulfilled and > resulted in a kernel warning/call trace if driver > used intermediate software queues (e.g. ath10k). > > Existing code sequences should've guranteed safety > but it's always good to be extra careful. > Applied. johannes
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index fa8d38eb9236..91461c415525 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1449,7 +1449,9 @@ int ieee80211_txq_setup_flows(struct ieee80211_local *local) local->cvars = kcalloc(fq->flows_cnt, sizeof(local->cvars[0]), GFP_KERNEL); if (!local->cvars) { + spin_lock_bh(&fq->lock); fq_reset(fq, fq_skb_free_func); + spin_unlock_bh(&fq->lock); return -ENOMEM; } @@ -1469,7 +1471,9 @@ void ieee80211_txq_teardown_flows(struct ieee80211_local *local) kfree(local->cvars); local->cvars = NULL; + spin_lock_bh(&fq->lock); fq_reset(fq, fq_skb_free_func); + spin_unlock_bh(&fq->lock); } struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,