Message ID | 20230517213101.25617-1-mirsad.todorovac@alu.unizg.hr |
---|---|
State | New |
Headers | show |
Series | [v5,1/1] wifi: mac80211: fortify the spinlock against deadlock by interrupt | expand |
Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr> writes: > On 5/17/23 23:34, Johannes Berg wrote: >>> >>> Fixes: 4444bc2116ae ("wifi: mac80211: Proper mark iTXQs for resumption") >>> Link: https://lore.kernel.org/all/1f58a0d1-d2b9-d851-73c3-93fcc607501c@alu.unizg.hr/ >>> Reported-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr> >>> Link: https://lore.kernel.org/all/cdc80531-f25f-6f9d-b15f-25e16130b53a@alu.unizg.hr/ >>> Signed-off-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr> >>> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> >>> --- >>> >> >> You really should say what you changed, but anyway, it's too late - I >> applied a previous version yesterday. > > Yes. Sorry, I was following Andy's advice to resend, at the wrong > assumption that the system ate the patch after three weeks of > inactivity. :-/ Yeah, unfortunately we maintainers are busy so sometimes it takes before we can process patches. But you can check the patch status from patchwork, link below. Also the wiki has more information how we use it.
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 1a3327407552..0d9fbc8458fd 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3791,6 +3791,7 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, ieee80211_tx_result r; struct ieee80211_vif *vif = txq->vif; int q = vif->hw_queue[txq->ac]; + unsigned long flags; bool q_stopped; WARN_ON_ONCE(softirq_count() == 0); @@ -3799,9 +3800,9 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, return NULL; begin: - spin_lock(&local->queue_stop_reason_lock); + spin_lock_irqsave(&local->queue_stop_reason_lock, flags); q_stopped = local->queue_stop_reasons[q]; - spin_unlock(&local->queue_stop_reason_lock); + spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); if (unlikely(q_stopped)) { /* mark for waking later */