linux-stable/sound
Takashi Iwai 3c3201f8c7 ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls
Like the previous fixes to hw_params and hw_free ioctl races, we need
to paper over the concurrent prepare ioctl calls against hw_params and
hw_free, too.

This patch implements the locking with the existing
runtime->buffer_mutex for prepare ioctls.  Unlike the previous case
for snd_pcm_hw_hw_params() and snd_pcm_hw_free(), snd_pcm_prepare() is
performed to the linked streams, hence the lock can't be applied
simply on the top.  For tracking the lock in each linked substream, we
modify snd_pcm_action_group() slightly and apply the buffer_mutex for
the case stream_lock=false (formerly there was no lock applied)
there.

Cc: <stable@vger.kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220322170720.3529-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-03-22 20:56:42 +01:00
..
ac97
aoa
arm
atmel
core ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls 2022-03-22 20:56:42 +01:00
drivers ALSA: virmidi: Remove duplicated code 2022-01-06 16:08:18 +01:00
firewire ALSA: firewire-lib: fix uninitialized flag for AV/C deferred transaction 2022-03-04 17:23:21 +01:00
hda ASoC: Updates for v5.18 2022-03-21 16:19:21 +01:00
i2c
isa ALSA: gus: Fix memory leaks at memory allocator error paths 2021-12-13 16:41:12 +01:00
mips ALSA: mips: Use platform_get_irq() to get the interrupt 2022-02-28 16:59:01 +01:00
oss
parisc
pci Merge branch 'for-next' into for-linus 2022-03-21 16:18:34 +01:00
pcmcia
ppc ALSA: ppc: beep: fix clang -Wimplicit-fallthrough 2021-12-07 15:36:56 +01:00
sh
soc ASoC: Updates for v5.18 2022-03-21 16:19:21 +01:00
sparc ALSA: sparc: no need to initialise statics to 0 2021-12-12 10:01:04 +01:00
spi ALSA: spi: Add check for clk_enable() 2022-02-28 17:00:10 +01:00
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-09 07:18:50 +01:00
usb Merge branch 'for-next' into for-linus 2022-03-21 16:18:34 +01:00
virtio virtio: wrap config->reset calls 2022-01-14 18:50:52 -05:00
x86 ALSA: x86: Use standard mmap helper for Intel HDMI LPE audio 2022-03-05 09:33:48 +01:00
xen xen: flag xen_snd_front to be not essential for system boot 2021-11-23 13:43:54 -06:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c sound: core: Remove redundant variable and return the last statement 2022-02-28 17:57:14 +01:00