mirror of
https://github.com/torvalds/linux.git
synced 2026-10-10 20:38:02 +02:00
wifi: iwlwifi: fix counter type in iwl_fwrt_dump_error_logs
The loop counter 'count' was declared as u8 while num_pc is u32.
If firmware advertises more than 255 PC entries the counter wraps
back to zero and the loop never terminates potentially causing an
infinite loop or reading past the allocated pc_data array.
Change the declaration to u32 to match num_pc.
Fixes: 2b69d242e2 ("wifi: iwlwifi: fw: print PC register value instead of address")
Assisted-by: GitHubCopilot:gpt-5.3-codex
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260715220243.a61c65f34e87.Ie5f1a7ca43e0cc5a0ddc8305b0448ddffc09cd18@changeid
This commit is contained in:
parent
bbe2d2fa87
commit
71e67b4b59
|
|
@ -369,7 +369,7 @@ static void iwl_fwrt_dump_fseq_regs(struct iwl_fw_runtime *fwrt)
|
|||
void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
struct iwl_pc_data *pc_data;
|
||||
u8 count;
|
||||
u32 count;
|
||||
|
||||
if (!iwl_trans_device_enabled(fwrt->trans)) {
|
||||
IWL_ERR(fwrt,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user