kernel_samsung_a53x/sound
Amelie Delaunay c6abcded78 ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove
[ Upstream commit 9bb4af400c386374ab1047df44c508512c08c31f ]

In case of error when requesting ctrl_chan DMA channel, ctrl_chan is not
null. So the release of the dma channel leads to the following issue:
[    4.879000] st,stm32-spdifrx 500d0000.audio-controller:
dma_request_slave_channel error -19
[    4.888975] Unable to handle kernel NULL pointer dereference
at virtual address 000000000000003d
[...]
[    5.096577] Call trace:
[    5.099099]  dma_release_channel+0x24/0x100
[    5.103235]  stm32_spdifrx_remove+0x24/0x60 [snd_soc_stm32_spdifrx]
[    5.109494]  stm32_spdifrx_probe+0x320/0x4c4 [snd_soc_stm32_spdifrx]

To avoid this issue, release channel only if the pointer is valid.

Fixes: 794df9448edb ("ASoC: stm32: spdifrx: manage rebind issue")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20241105140242.527279-1-olivier.moysan@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:23 +01:00
..
ac97
aoa
arm
atmel
core Revert "ALSA: mixer_oss: Remove some incorrect kfree_const() usages" 2024-11-24 00:23:11 +01:00
drivers
firewire ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init() 2024-11-30 02:33:23 +01:00
hda Revert "ALSA: hda: Add input value sanity checks to HDMI channel map controls" 2024-11-24 00:23:43 +01:00
i2c
isa
mips
oss/dmasound
parisc
pci Revert "ALSA: hda/realtek: Fix noise from speakers on Lenovo IdeaPad 3 15IAU7" 2024-11-24 00:23:53 +01:00
pcmcia
ppc
sh ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs 2024-11-19 09:22:42 +01:00
soc ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove 2024-11-30 02:33:23 +01:00
sparc
spi
synth ALSA: emux: improve patch ioctl data validation 2024-11-19 14:19:32 +01:00
usb Revert "ALSA: usb-audio: Define macros for quirk table entries" 2024-11-24 00:23:07 +01:00
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c