Patch "wifi: iwlwifi: dbg_ini: fix structure packing" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: iwlwifi: dbg_ini: fix structure packing

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-iwlwifi-dbg_ini-fix-structure-packing.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 75bd69733e8b1caaf1ba1ecbf467cc751a07b3aa
Author: Arnd Bergmann <arnd@xxxxxxxx>
Date:   Fri Jun 16 11:03:34 2023 +0200

    wifi: iwlwifi: dbg_ini: fix structure packing
    
    [ Upstream commit 424c82e8ad56756bb98b08268ffcf68d12d183eb ]
    
    The iwl_fw_ini_error_dump_range structure has conflicting alignment
    requirements for the inner union and the outer struct:
    
    In file included from drivers/net/wireless/intel/iwlwifi/fw/dbg.c:9:
    drivers/net/wireless/intel/iwlwifi/fw/error-dump.h:312:2: error: field  within 'struct iwl_fw_ini_error_dump_range' is less aligned than 'union iwl_fw_ini_error_dump_range::(anonymous at drivers/net/wireless/intel/iwlwifi/fw/error-dump.h:312:2)' and is usually due to 'struct iwl_fw_ini_error_dump_range' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]
            union {
    
    As the original intention was apparently to make the entire structure
    unaligned, mark the innermost members the same way so the union
    becomes packed as well.
    
    Fixes: 973193554cae6 ("iwlwifi: dbg_ini: dump headers cleanup")
    Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
    Acked-by: Gregory Greenman <gregory.greenman@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230616090343.2454061-1-arnd@xxxxxxxxxx
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/error-dump.h b/drivers/net/wireless/intel/iwlwifi/fw/error-dump.h
index cb40f509ab612..d08750abac953 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/error-dump.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/error-dump.h
@@ -334,9 +334,9 @@ struct iwl_fw_ini_fifo_hdr {
 struct iwl_fw_ini_error_dump_range {
 	__le32 range_data_size;
 	union {
-		__le32 internal_base_addr;
-		__le64 dram_base_addr;
-		__le32 page_num;
+		__le32 internal_base_addr __packed;
+		__le64 dram_base_addr __packed;
+		__le32 page_num __packed;
 		struct iwl_fw_ini_fifo_hdr fifo_hdr;
 		struct iwl_cmd_header fw_pkt_hdr;
 	};



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux