RE: [PATCH rtw-next v4 3/4] wifi: rtw88: do not drop stations when collecting them for an iteration
From: Ping-Ke Shih
Date: Fri Nov 27 2026 - 00:47:41 EST
Mehmet Fide <mehmet.fide@xxxxxxxxx> wrote:
> From: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
>
> rtw_iterate_stas() allocates an entry with GFP_ATOMIC for each station
> it collects, and skips the station when that fails. Once the firmware
> recovery resets the stations through it (next patch), a skipped station
> keeps its TX queues on rtwdev->txqs, and rtw_txq_init() later
> reinitializes a list node that is still linked.
>
> Link the stations through a list node in struct rtw_sta_info instead.
> All callers hold rtwdev->mutex and no iterator collects again, so one
> node per station is enough.
>
> Skip stations without si->vif. A station moved back from ASSOC to AUTH
> has gone through rtw_sta_remove() but is still found by the atomic
> iterator, and mac80211 can free it without calling the driver before
> the iterator runs.
>
> Reported-by: Luka Gejak <luka.gejak@xxxxxxxxx>
> Closes: https://lore.kernel.org/linux-wireless/4EE3D95E-988D-4514-9849-9546CD49D8E9@xxxxxxxxx/
> Fixes: 78d5bf925f30 ("wifi: rtw88: iterate over vif/sta list non-atomically")
> Signed-off-by: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>