Re: [PATCH rtw-next v4 3/4] wifi: rtw88: do not drop stations when collecting them for an iteration
From: Luka Gejak
Date: Mon Nov 23 2026 - 18:38:27 EST
On November 21, 2026 8:15:27 PM GMT+01:00, 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>
>---
>
Looks good to me,
Reviewed-by: Luka Gejak <luka.gejak@xxxxxxxxx>
Best regards,
Luka Gejak