public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Shayne Chen <shayne.chen@mediatek.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Evelyn Tsai <evelyn.tsai@mediatek.com>,
	Money Wang <money.wang@mediatek.com>,
	linux-mediatek <linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH 1/5] wifi: mt76: fix potential deadlock caused by rx_lock
Date: Mon, 2 Feb 2026 19:46:06 +0800	[thread overview]
Message-ID: <1d327fad53675a7193c81e9c0ae2e91c2aa4e74d.camel@mediatek.com> (raw)
In-Reply-To: <e785fe7c-eb3c-4697-9ea6-705c8c9dcfe1@nbd.name>

On Mon, 2026-02-02 at 09:52 +0100, Felix Fietkau wrote:
> On 02.02.26 08:53, Shayne Chen wrote:
> > A deadlock will occur if both of the following conditions are met,
> > because they each attempt to acquire the rx_lock:
> > - mac80211 receives an unexpected BAR control frame, which triggers
> >    a BA deletion
> > - A transmission failure happens due to an abnormality in DMA
> > 
> > Since ieee80211_tx_status_ext() is primarily used to address AQL
> > issues,
> > avoid potential deadlocks by restricting calls to
> > ieee80211_tx_status_ext
> > only for data frames.
> 
> First of all, ieee80211_tx_status_ext is not primarily used to
> address 
> AQL, ieee80211_free_txskb handles it as well. The reason for it is tx
> status handling, e.g. for management frames sent by hostapd that
> require 
> an ACK status report, so limiting the status calls for data frames
> seems 
> wrong to me.
> 
> I don't really understand how the scenario you're describing leads to
> a 
> deadlock. From my understanding, if something in the mac80211 rx path
> triggers a tx, it should end up calling mt76_tx(), which queues the
> skb 
> to wcid->tx_list and triggers the tx worker. So the actual dma tx
> callls 
> are expected to come from the worker kthread.
> How does this lead to a deadlock on rx_lock?

Hi Felix,

Thanks for the explanation.
I've re-checked the codebase used by the customer when the issue was
reported, and I found that the wcid->tx_list structure was not present
in that version. So yes, this problem should not occur in the current
codebase.

Will drop this patch in v2.

Thanks,
Shayne
> 
> - Felix


      reply	other threads:[~2026-02-02 11:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02  7:53 [PATCH 1/5] wifi: mt76: fix potential deadlock caused by rx_lock Shayne Chen
2026-02-02  7:53 ` [PATCH 2/5] wifi: mt76: mt7996: fix wrong DMAD length when using MAC TXP Shayne Chen
2026-02-02  7:53 ` [PATCH 3/5] wifi: mt76: mt7996: fix struct mt7996_mcu_uni_event Shayne Chen
2026-02-02  7:53 ` [PATCH 4/5] wifi: mt76: avoid to set ACK for MCU command if wait_resp is not set Shayne Chen
2026-02-02  7:53 ` [PATCH 5/5] wifi: mt76: mt7996: fix queue pause after scan due to wrong channel switch reason Shayne Chen
2026-02-02  9:01   ` Felix Fietkau
2026-02-02 11:52     ` Shayne Chen
2026-02-02 12:22       ` Felix Fietkau
2026-02-02  8:52 ` [PATCH 1/5] wifi: mt76: fix potential deadlock caused by rx_lock Felix Fietkau
2026-02-02 11:46   ` Shayne Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d327fad53675a7193c81e9c0ae2e91c2aa4e74d.camel@mediatek.com \
    --to=shayne.chen@mediatek.com \
    --cc=evelyn.tsai@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=money.wang@mediatek.com \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox