mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 00:06:36 +00:00
![]() If we (for example) have a trans_cfg entry in the PCI IDs table, but then don't find a full cfg entry for it in the info table, we fall through to the code that treats the PCI ID table entry as a full cfg entry. This obviously causes crashes later, e.g. when trying to build the firmware name string. Avoid such crashes by using the low bit of the pointer as a tag for trans_cfg entries (automatically using a macro that checks the type when assigning) and then checking that before trying to use the data as a full entry - if it's just a partial entry at that point, fail. Since we're adding some macro magic, also check that the type is in fact either struct iwl_cfg_trans_params or struct iwl_cfg, failing compilation ("initializer element is not constant") if it isn't. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210330162204.6f69fe6e4128.I921d4ae20ef5276716baeeeda0b001cf25b9b968@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com> |
||
---|---|---|
.. | ||
cfg | ||
dvm | ||
fw | ||
mvm | ||
pcie | ||
queue | ||
iwl-agn-hw.h | ||
iwl-config.h | ||
iwl-context-info-gen3.h | ||
iwl-context-info.h | ||
iwl-csr.h | ||
iwl-dbg-tlv.c | ||
iwl-dbg-tlv.h | ||
iwl-debug.c | ||
iwl-debug.h | ||
iwl-devtrace-data.h | ||
iwl-devtrace-io.h | ||
iwl-devtrace-iwlwifi.h | ||
iwl-devtrace-msg.h | ||
iwl-devtrace-ucode.h | ||
iwl-devtrace.c | ||
iwl-devtrace.h | ||
iwl-drv.c | ||
iwl-drv.h | ||
iwl-eeprom-parse.c | ||
iwl-eeprom-parse.h | ||
iwl-eeprom-read.c | ||
iwl-eeprom-read.h | ||
iwl-fh.h | ||
iwl-io.c | ||
iwl-io.h | ||
iwl-modparams.h | ||
iwl-nvm-parse.c | ||
iwl-nvm-parse.h | ||
iwl-op-mode.h | ||
iwl-phy-db.c | ||
iwl-phy-db.h | ||
iwl-prph.h | ||
iwl-scd.h | ||
iwl-trans.c | ||
iwl-trans.h | ||
Kconfig | ||
Makefile |