Message ID | 20230517213101.25617-1-mirsad.todorovac@alu.unizg.hr (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Johannes Berg |
Headers | show |
Series | [v5,1/1] wifi: mac80211: fortify the spinlock against deadlock by interrupt | expand |
> > 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. Also, I suspect you just collected the reviewed-by tag here, which really you shouldn't be doing a resend for. johannes
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. :-/ The difference is really in the mailbox containing the patch, but git somehow ate that, too. Beginner's errors. :-( --- v4 -> v5: - Some cleanup, keeping the longer stacktrace as requested v3 -> v4: - Added whole lockdep trace as advised. - Trimmed irrelevant line prefix. v2 -> v3: - Fix the Fixes: tag as advised. - Change the net: to wifi: to comply with the original patch that is being fixed. v1 -> v2: - Minor rewording and clarification. - Cc:-ed people that replied to the original bug report (forgotten in v1 by omission). net/mac80211/tx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Rest assured, the code did not change. It is a rather obvious fix to the interrupt caused deadlock. > Also, I suspect you just collected the reviewed-by tag here, which > really you shouldn't be doing a resend for. This is correct, plus cosmetic removal of Cc:s as advised. Sorry for confusion, I am really having a great time with the Intel Linux team and I am currently updating my homework on Wi-Fi. Provided that there will be more use of me for the wireless. But I can always justify anything used in multimedia or graphic rendering as my field of research. Well, almost anything :-) Best regards, Mirsad
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 */