Skip to content

Commit fe83e73

Browse files
crojewsk-intelmehmetb0
authored andcommitted
ASoC: Intel: avs: Fix theoretical infinite loop
BugLink: https://bugs.launchpad.net/bugs/2103829 [ Upstream commit cf4d742 ] 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: c8c960c ("ASoC: Intel: avs: APL-based platforms support") Signed-off-by: Cezary Rojewski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Noah Wager <[email protected]> Signed-off-by: Mehmet Basaran <[email protected]>
1 parent b32d775 commit fe83e73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/intel/avs/apl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ int avs_apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)
125125
struct avs_apl_log_buffer_layout layout;
126126
void __iomem *addr, *buf;
127127
size_t dump_size;
128-
u16 offset = 0;
128+
u32 offset = 0;
129129
u8 *dump, *pos;
130130

131131
dump_size = AVS_FW_REGS_SIZE + msg->ext.coredump.stack_dump_size;

0 commit comments

Comments
 (0)