linux-stable/sound/soc
Stephen Lee e9b71370cb ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw
[ Upstream commit fc563aa900 ]

In snd_soc_info_volsw(), mask is generated by figuring out the index of
the most significant bit set in max and converting the index to a
bitmask through bit shift 1. Unintended wraparound occurs when max is an
integer value with msb bit set. Since the bit shift value 1 is treated
as an integer type, the left shift operation will wraparound and set
mask to 0 instead of all 1's. In order to fix this, we type cast 1 as
`1ULL` to prevent the wraparound.

Fixes: 7077148fb5 ("ASoC: core: Split ops out of soc-core.c")
Signed-off-by: Stephen Lee <slee08177@gmail.com>
Link: https://msgid.link/r/20240326010131.6211-1-slee08177@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-10 16:19:41 +02:00
..
adi
amd
atmel Revert "ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek" 2024-01-25 14:52:31 -08:00
au1x
bcm
cirrus
codecs ASoC: rt711-sdw: fix locking sequence 2024-04-10 16:19:41 +02:00
dwc ASoC: dwc: move DMA init to snd_soc_dai_driver probe() 2023-06-21 15:59:13 +02:00
fsl ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable 2024-01-15 18:51:11 +01:00
generic ASoC: simple-card: fixup asoc_simple_probe() error handling 2023-11-08 17:26:44 +01:00
hisilicon
img
intel ASoC: Intel: bytcr_rt5640: Add an extra entry for the Chuwi Vi8 tablet 2024-03-26 18:21:13 -04:00
jz4740 ASoC: jz4740-i2s: Handle independent FIFO flush bits 2023-01-12 11:58:57 +01:00
kirkwood ASoC: kirkwood: Iterate over array indexes instead of using pointer math 2023-03-10 09:39:53 +01:00
mediatek ASoC: mediatek: mt8173: Fix snd_soc_component_initialize error path 2023-07-23 13:47:35 +02:00
meson ASoC: meson: axg-tdm-interface: add frame rate constraint 2024-03-26 18:21:30 -04:00
mxs
pxa ASoC: pxa: fix a memory leak in probe() 2023-10-25 11:59:03 +02:00
qcom ASoC: qcom: lpass-cpu: Fix fallback SD line index handling 2023-01-18 11:48:48 +01:00
rockchip ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume() 2022-12-31 13:14:45 +01:00
samsung
sh ASoC: rsnd: fixup #endif position 2023-03-10 09:39:27 +01:00
sof ASoC: SOF: sof-pci-dev: Fix community key quirk detection 2023-12-08 08:48:04 +01:00
spear
sprd
sti
stm ASoC: stm32: dfsdm: manage cb buffers cleanup 2022-12-02 17:41:10 +01:00
sunxi ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616 2024-03-01 13:21:45 +01:00
tegra ASoC: tegra: Fix redundant PLLA and PLLA_OUT0 updates 2023-10-10 21:59:04 +02:00
ti ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings 2023-11-28 16:56:20 +00:00
uniphier
ux500
xilinx
xtensa
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c
soc-compress.c ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE 2023-05-17 11:50:26 +02:00
soc-core.c ASoC: soc-pcm: Fix and cleanup DPCM locking 2023-05-17 11:50:15 +02:00
soc-dai.c
soc-dapm.c
soc-devres.c
soc-generic-dmaengine-pcm.c
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw 2024-04-10 16:19:41 +02:00
soc-pcm.c ASoC: soc-pcm: test if a BE can be prepared 2023-06-21 15:59:13 +02:00
soc-topology-test.c
soc-topology.c ASoC: topology: Return -ENOMEM on memory allocation failure 2023-02-14 19:18:01 +01:00
soc-utils.c ASoC: soc-utils: Export snd_soc_dai_is_dummy() symbol 2023-10-10 21:59:04 +02:00