* [PATCH] wifi: mt76: Fix missing barrier after initialization check in ath9k_wmi_event_tasklet()
@ 2026-07-01 13:57 Thomas Fourier
0 siblings, 0 replies; only message in thread
From: Thomas Fourier @ 2026-07-01 13:57 UTC (permalink / raw)
Cc: Thomas Fourier, Toke Høiland-Jørgensen, Kalle Valo,
Tetsuo Handa, linux-wireless, linux-kernel
The write memory barrier in ath9k_htc_probe_device() before writing to
priv->initialized, so it seems like one is also needed after reading it,
but seems like there is none after reading priv->initialized.
Add a read barrier after reading the priv->initialized flag to prevent
reordering of reads.
Fixes: 8b3046abc99e ("ath9k_htc: fix NULL pointer dereference at ath9k_htc_tx_get_packet()")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
---
drivers/net/wireless/ath/ath9k/wmi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c
index 284e8c13b043..1e28599a6146 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -160,6 +160,11 @@ void ath9k_wmi_event_tasklet(struct tasklet_struct *t)
kfree_skb(skb);
continue;
}
+ /*
+ * Make sure ath9k_htc_probe_device() initialization is
+ * committed to memory before processing skb.
+ */
+ smp_rmb();
hdr = (struct wmi_cmd_hdr *) skb->data;
cmd_id = be16_to_cpu(hdr->command_id);
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-01 14:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 13:57 [PATCH] wifi: mt76: Fix missing barrier after initialization check in ath9k_wmi_event_tasklet() Thomas Fourier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox