linux-stable/sound/soc
Stephen Lee aa5936f5ec 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-13 12:59:32 +02:00
..
adi
amd
atmel Revert "ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek" 2024-01-25 14:37:51 -08:00
au1x
bcm
cirrus
codecs ASoC: wm8962: Fix up incorrect error message in wm8962_set_fll 2024-03-26 18:21:47 -04:00
dwc ASoC: dwc: move DMA init to snd_soc_dai_driver probe() 2023-06-21 15:45:36 +02:00
fsl ASoC: fsl_micfil: register platform component before registering cpu dai 2024-03-01 13:16:46 +01:00
generic ASoC: simple-card: fixup asoc_simple_probe() error handling 2023-12-08 08:46:10 +01:00
hisilicon
img
intel ASoC: Intel: bytcr_rt5640: Add an extra entry for the Chuwi Vi8 tablet 2024-03-26 18:21:47 -04:00
jz4740 ASoC: jz4740-i2s: Handle independent FIFO flush bits 2023-01-14 10:16:35 +01:00
kirkwood ASoC: kirkwood: Iterate over array indexes instead of using pointer math 2023-03-11 16:39:53 +01:00
mediatek ASoC: mediatek: mt8173: Fix snd_soc_component_initialize error path 2023-07-27 08:44:14 +02:00
meson ASoC: meson: axg-tdm-interface: add frame rate constraint 2024-03-26 18:21:59 -04:00
mxs ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe 2022-06-09 10:21:07 +02:00
pxa ASoC: pxa: fix a memory leak in probe() 2023-10-25 11:54:25 +02:00
qcom ASoC: qcom: lpass-cpu: Fix fallback SD line index handling 2023-01-18 11:44:54 +01:00
rockchip ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume() 2023-01-14 10:16:21 +01:00
samsung ASoC: samsung: change gpiod_speaker_power and rx1950_audio from global to static variables 2022-08-21 15:16:06 +02:00
sh ASoC: rsnd: Add check for rsnd_mod_power_on 2022-10-26 13:25:26 +02:00
sirf
sof ASoC: SOF: sof-pci-dev: Fix community key quirk detection 2023-12-08 08:46:14 +01:00
spear
sprd
sti ASoC: sti: Fix deadlock via snd_pcm_stop_xrun() call 2022-03-28 09:57:08 +02:00
stm
sunxi ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616 2024-03-01 13:16:44 +01:00
tegra
ti ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings 2023-11-28 16:54:53 +00:00
txx9
uniphier
ux500
xilinx ASoC: xilinx: xlnx_formatter_pcm: Handle sysclk setting 2022-04-08 14:40:05 +02:00
xtensa
zte
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c
soc-compress.c ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress() 2023-03-11 16:39:35 +01:00
soc-core.c ASoC: core: Fix use-after-free in snd_soc_exit() 2022-11-25 17:45:42 +01:00
soc-dai.c
soc-dapm.c ASoC: dapm: Initialise kcontrol data for mux/demux controls 2022-07-21 21:20:16 +02:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: dmaengine: Restore NULL prepare_slave_config() callback 2022-05-12 12:25:37 +02:00
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw 2024-04-13 12:59:32 +02:00
soc-pcm.c ASoC: soc-pcm: test if a BE can be prepared 2023-06-21 15:45:36 +02:00
soc-topology.c ASoC: topology: Allow TLV control to be either read or write 2022-04-08 14:40:44 +02:00
soc-utils.c ASoC: soc-utils: Remove __exit for snd_soc_util_exit() 2022-11-25 17:45:43 +01:00