kernel_samsung_a53x/sound/soc
Qiu-ji Chen f51f379e06 ASoC: codecs: Fix atomicity violation in snd_soc_component_get_drvdata()
commit 1157733344651ca505e259d6554591ff156922fa upstream.

An atomicity violation occurs when the validity of the variables
da7219->clk_src and da7219->mclk_rate is being assessed. Since the entire
assessment is not protected by a lock, the da7219 variable might still be
in flux during the assessment, rendering this check invalid.

To fix this issue, we recommend adding a lock before the block
if ((da7219->clk_src == clk_id) && (da7219->mclk_rate == freq)) so that
the legitimacy check for da7219->clk_src and da7219->mclk_rate is
protected by the lock, ensuring the validity of the check.

This possible bug is found by an experimental static analysis tool
developed by our team. This tool analyzes the locking APIs
to extract function pairs that can be concurrently executed, and then
analyzes the instructions in the paired functions to identify possible
concurrency bugs including data races and atomicity violations.

Fixes: 6d817c0e9fd7 ("ASoC: codecs: Add da7219 codec driver")
Cc: stable@vger.kernel.org
Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
Link: https://patch.msgid.link/20240930101216.23723-1-chenqiuji666@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:24:17 +01:00
..
adi
amd
atmel Revert "ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek" 2024-11-18 12:12:45 +01:00
au1x Revert "ASoC: allow module autoloading for table db1200_pids" 2024-11-24 00:23:34 +01:00
bcm
cirrus
codecs ASoC: codecs: Fix atomicity violation in snd_soc_component_get_drvdata() 2024-12-17 13:24:17 +01:00
dwc clkdev: remove CONFIG_CLKDEV_LOOKUP 2024-12-17 13:24:00 +01:00
fsl ASoC: fsl_micfil: fix regmap_write_bits usage 2024-12-17 13:24:04 +01:00
generic ASoC: Fix 7/8 spaces indentation in Kconfig 2024-11-19 11:32:42 +01:00
hisilicon
img
intel ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet 2024-12-17 13:23:57 +01:00
jz4740
kirkwood
mediatek
meson Revert "ASoC: meson: axg-card: fix 'use-after-free'" 2024-11-24 00:23:34 +01:00
mxs
pxa ARM: pxa: spitz: use gpio descriptors for audio 2024-11-23 23:20:06 +01:00
qcom ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe() 2024-11-23 23:22:02 +01:00
rockchip clkdev: remove CONFIG_CLKDEV_LOOKUP 2024-12-17 13:24:00 +01:00
samsung
sh
sirf
sof
spear
sprd
sti
stm ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div() 2024-12-17 13:23:58 +01:00
sunxi ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616 2024-11-18 22:25:33 +01:00
tegra ASoC: tegra: Fix DSPK 16-bit playback 2024-11-19 11:32:48 +01:00
ti ASoC: ti: omap-hdmi: Fix too long driver name 2024-11-19 14:19:48 +01:00
txx9
uniphier
ux500
xilinx
xtensa
zte
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c
soc-compress.c
soc-core.c
soc-dai.c
soc-dapm.c ASoC: dapm: Fix UAF for snd_soc_pcm_runtime object 2024-11-23 23:20:59 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ALSA: dmaengine: Synchronize dma channel after drop() 2024-11-19 14:19:48 +01:00
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: Fix wraparound for mask in snd_soc_get_volsw 2024-11-19 09:23:10 +01:00
soc-pcm.c
soc-topology.c Revert "ASoC: topology: Properly initialize soc_enum values" 2024-11-24 00:23:41 +01:00
soc-utils.c