summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2024-04-05 12:09:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-12 12:12:00 +0300
commita1780d8a7c268d44c9abce8ce94355fa7dd0d3a3 (patch)
tree73a0a42b628d3aa3b02f9f2507a5ec4eeaef7b4a /sound/soc
parent7976b78631eecaddd83a189c03fe62d1cd33881b (diff)
downloadlinux-a1780d8a7c268d44c9abce8ce94355fa7dd0d3a3.tar.xz
ASoC: Intel: avs: Fix potential integer overflow
[ Upstream commit c7e832cabe635df47c2bf6df7801e97bf3045b1e ] While stream_tag for CLDMA on SKL-based platforms is always 1, function hda_cldma_setup() uses AZX_SD_CTL_STRM() macro which does: stream_tag << 20 what combined with stream_tag type of 'unsigned int' generates a potential overflow issue. Update the field type to fix that. Fixes: 45864e49a05a ("ASoC: Intel: avs: Implement CLDMA transfer") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240405090929.1184068-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/intel/avs/cldma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/avs/cldma.c b/sound/soc/intel/avs/cldma.c
index d7a9390b5e48..585579840b64 100644
--- a/sound/soc/intel/avs/cldma.c
+++ b/sound/soc/intel/avs/cldma.c
@@ -35,7 +35,7 @@ struct hda_cldma {
unsigned int buffer_size;
unsigned int num_periods;
- unsigned int stream_tag;
+ unsigned char stream_tag;
void __iomem *sd_addr;
struct snd_dma_buffer dmab_data;