From: Luka Gejak <luka.gejak@linux.dev>
To: Mehmet Fide <mehmet.fide@gmail.com>, Ping-Ke Shih <pkshih@realtek.com>
Cc: Zong-Zhe Yang <kevin_yang@realtek.com>,
Tzu-En Huang <tehuang@realtek.com>,
Yan-Hsuan Chuang <yhchuang@realtek.com>,
Kalle Valo <kvalo@kernel.org>,
Stanislaw Gruszka <sgruszka@redhat.com>,
Brian Norris <briannorris@chromium.org>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
mehmet.fide@screeningeagle.com
Subject: Re: [PATCH rtw-next v2 3/3] wifi: rtw88: reset the stations outside of RCU on firmware recovery
Date: Mon, 16 Nov 2026 16:55:49 +0100 [thread overview]
Message-ID: <4EE3D95E-988D-4514-9849-9546CD49D8E9@linux.dev> (raw)
In-Reply-To: <20261116072014.1142494-4-mehmet.fide@gmail.com>
Hi Mehmet,
Thanks for the update. One comment below.
On November 16, 2026 8:20:14 AM GMT+01:00, Mehmet Fide
<mehmet.fide@gmail.com> wrote:
> @@ -664,7 +664,7 @@ static void __fw_recovery_work(struct rtw_dev *rtwdev)
> WARN(1, "firmware crash, start reset and recover\n");
>
> rtw_iterate_keys_atomic(rtwdev, NULL, rtw_reset_key_iter, rtwdev);
> - rtw_iterate_stas_atomic(rtwdev, rtw_reset_sta_iter, rtwdev);
> + rtw_iterate_stas(rtwdev, rtw_reset_sta_iter, rtwdev);
> rtw_iterate_vifs_atomic(rtwdev, rtw_reset_vif_iter, rtwdev);
I followed the allocation failure case from v1 a bit further:
https://lore.kernel.org/r/699D1E7C-1793-44A7-AF57-CFE16AD036E6@linux.dev/
As far as I can see, skipping a station also skips rtw_txq_cleanup().
For a queue outside the voice access category, wake_tx_queue() queues
tx_work. If that work has not run yet, the omitted station's queue can
stay on rtwdev->txqs until reconfiguration. rtw_sta_add() then calls
rtw_txq_init(), which does this without unlinking it:
INIT_LIST_HEAD(&rtwtxq->list);
The device list still points at that node, but the node now points to
itself. __rtw_tx_work() seems to keep visiting it while holding
txq_lock. Its list_del_init() cannot repair the device list because
the node has already lost its old links.
rtw_enter_ips() does not drain rtwdev->tx_wq, and the flush in
ieee80211_restart_work() is of mac80211's separate workqueue. So I think
this can hang the TX worker, beyond the station count and MAC ID leak
I mentioned before.
Could recovery use an iteration that cannot silently skip stations?
Best regards,
Luka Gejak
prev parent reply other threads:[~2026-11-16 15:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 7:20 [PATCH rtw-next v2 0/3] wifi: rtw88: three fixes around the firmware recovery Mehmet Fide
2026-11-16 7:20 ` [PATCH rtw-next v2 1/3] wifi: rtw88: free the reserved pages of an interface on " Mehmet Fide
2026-11-16 16:02 ` Luka Gejak
2026-11-16 7:20 ` [PATCH rtw-next v2 2/3] wifi: rtw88: report the frames purged from the TX report queue Mehmet Fide
2026-11-16 7:20 ` [PATCH rtw-next v2 3/3] wifi: rtw88: reset the stations outside of RCU on firmware recovery Mehmet Fide
2026-11-16 15:55 ` Luka Gejak [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=4EE3D95E-988D-4514-9849-9546CD49D8E9@linux.dev \
--to=luka.gejak@linux.dev \
--cc=briannorris@chromium.org \
--cc=kevin_yang@realtek.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mehmet.fide@gmail.com \
--cc=mehmet.fide@screeningeagle.com \
--cc=pkshih@realtek.com \
--cc=sgruszka@redhat.com \
--cc=tehuang@realtek.com \
--cc=yhchuang@realtek.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