[PATCH wireless-next 2/2] wifi: nxpwifi: do not delete Rx reorder entries under RCU

From: David Carlier

Date: Tue Aug 25 2026 - 19:20:04 EST


The RCU guard is declared in the body of the per-TID loop, so it is still
held across the teardown pass. nxpwifi_del_rx_reorder_entry() flushes the
Rx workqueue and deletes the reorder timer synchronously, both of which
sleep, so a station deauthenticating from the AP splats under
CONFIG_DEBUG_ATOMIC_SLEEP.

Scope the guard to the collection walk. The teardown does not need RCU: it
serialises on priv->rx_reorder_tbl_lock[] and frees with kfree_rcu().

Fixes: 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x")
Assisted-by: Claude:claude-opus-5
Signed-off-by: David Carlier <devnexen@xxxxxxxxx>
---
drivers/net/wireless/nxp/nxpwifi/11n_rxreorder.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/nxp/nxpwifi/11n_rxreorder.c b/drivers/net/wireless/nxp/nxpwifi/11n_rxreorder.c
index 65b628411543..87cf2ec85991 100644
--- a/drivers/net/wireless/nxp/nxpwifi/11n_rxreorder.c
+++ b/drivers/net/wireless/nxp/nxpwifi/11n_rxreorder.c
@@ -205,11 +205,12 @@ void nxpwifi_11n_del_rx_reorder_tbl_by_ta(struct nxpwifi_private *priv, u8 *ta)
return;

for (i = 0; i < MAX_NUM_TID; i++) {
- guard(rcu)();
- list_for_each_entry_rcu(tbl, &priv->rx_reorder_tbl_ptr[i], list) {
- if (!memcmp(tbl->ta, ta, ETH_ALEN)) {
- INIT_LIST_HEAD(&tbl->tmp_list);
- list_add_tail(&tbl->tmp_list, &to_delete);
+ scoped_guard(rcu) {
+ list_for_each_entry_rcu(tbl, &priv->rx_reorder_tbl_ptr[i], list) {
+ if (!memcmp(tbl->ta, ta, ETH_ALEN)) {
+ INIT_LIST_HEAD(&tbl->tmp_list);
+ list_add_tail(&tbl->tmp_list, &to_delete);
+ }
}
}

--
2.55.0