ASoC: Intel: avs: Fix theoretical infinite loop
[ Upstream commitcf4d74256f] While 'stack_dump_size' is a u32 bitfield of 16 bits, u32 has a bigger upper bound than the type u16 of loop counter 'offset' what in theory may lead to infinite loop condition. Found out by Coverity static analyzer. Fixes:c8c960c109("ASoC: Intel: avs: APL-based platforms support") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250109122216.3667847-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5e6f12d554
commit
49bc44a51d
@@ -107,7 +107,7 @@ static int avs_apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)
|
||||
struct avs_apl_log_buffer_layout layout;
|
||||
void __iomem *addr, *buf;
|
||||
size_t dump_size;
|
||||
u16 offset = 0;
|
||||
u32 offset = 0;
|
||||
u8 *dump, *pos;
|
||||
|
||||
dump_size = AVS_FW_REGS_SIZE + msg->ext.coredump.stack_dump_size;
|
||||
|
||||
Reference in New Issue
Block a user