* [PATCH] wifi: iwlwifi: Clean dangling pointer in tx path
@ 2026-02-14 19:05 greearb
0 siblings, 0 replies; only message in thread
From: greearb @ 2026-02-14 19:05 UTC (permalink / raw)
To: linux-wireless; +Cc: miriam.rachel.korenblit, Ben Greear
From: Ben Greear <greearb@candelatech.com>
If iwl_txq_gen2_build_tfd fails, we return -1, which will cause calling
code to dispose of the skb one way or another. Remove any reference to
that skb from the txq entries so that nothing will try to access it
later.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx-gen2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx-gen2.c
index df0545f09da95..f6db315658764 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx-gen2.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx-gen2.c
@@ -773,6 +773,8 @@ int iwl_txq_gen2_tx(struct iwl_trans *trans, struct sk_buff *skb,
tfd = iwl_txq_gen2_build_tfd(trans, txq, dev_cmd, skb, out_meta);
if (!tfd) {
+ txq->entries[idx].skb = NULL;
+ txq->entries[idx].cmd = NULL;
spin_unlock(&txq->lock);
return -1;
}
--
2.47.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-02-14 19:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-14 19:05 [PATCH] wifi: iwlwifi: Clean dangling pointer in tx path greearb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox