diff mbox series

wifi: iwlwifi: xvt: fix tx_req.data not being the last member of iwl_xvt_tx_mod_task_data

Message ID zwleihaxhtvxfutlncdn3euf56m5v7kjiamhobhqiuxh47zttt@mcivytuq6flb (mailing list archive)
State New
Delegated to: Miri Korenblit
Headers show
Series wifi: iwlwifi: xvt: fix tx_req.data not being the last member of iwl_xvt_tx_mod_task_data | expand

Commit Message

Markus Blöchl Aug. 8, 2023, 3:38 p.m. UTC
This patch is for backport-iwlwifi only.
There is a violation of the "encapsulating flexible array struct" rule.
As struct iwl_tm_mod_tx_request contains the flexible array member
'data' it also needs to be the last member of struct
iwl_xvt_tx_mod_task_data.  Otherwise the flexible array is no longer at
the end of struct iwl_xvt_tx_mod_task_data but instead overlaps with
iwl_xvt_tx_mod_task_data::completion.

Fixes: 3316d819dc59 ("[NOUPSTREAM] iwlwifi: xvt: fix thread completion")
Signed-off-by: Markus Blöchl <markus.bloechl@ipetronik.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-tm-infc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 7a0a4e45dd7b1482c9964748d0ffb086552a9d1e
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-tm-infc.h b/drivers/net/wireless/intel/iwlwifi/iwl-tm-infc.h
index fa647339ff93..68b44662cd78 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-tm-infc.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-tm-infc.h
@@ -459,8 +459,8 @@  struct iwl_tm_mod_tx_request {
 struct iwl_xvt_tx_mod_task_data {
 	__u32 lmac_id;
 	struct iwl_xvt *xvt;
-	struct iwl_tm_mod_tx_request tx_req;
 	struct completion *completion;
+	struct iwl_tm_mod_tx_request tx_req;
 } __packed __aligned(4);
 
 /*