linux/sound/hda
Pierre-Louis Bossart 46a8e16fcf ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign()
commit 1465d06a6d8580e73ae65f8590392df58c5ed2fd upstream.

The fields 'opened', 'running', 'assigned_key' are all protected by a
spinlock, but the spinlock is not taken when looking for a
stream. This can result in a possible race between assign() and
release().

Fix by taking the spinlock before walking through the bus stream list.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210924192417.169243-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: Scott Bruce <smbruce@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-26 10:47:23 +01:00
..
ext ALSA: hda: hdac_ext_stream: fix potential locking issues 2021-11-26 10:47:23 +01:00
array.c
hda_bus_type.c
hdac_bus.c
hdac_component.c
hdac_controller.c ALSA: hda: avoid write to STATESTS if controller is in reset 2021-10-27 09:54:29 +02:00
hdac_device.c
hdac_i915.c
hdac_regmap.c
hdac_stream.c ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign() 2021-11-26 10:47:23 +01:00
hdac_sysfs.c
hdmi_chmap.c
intel-nhlt.c ALSA: hda: ignore invalid NHLT table 2021-03-30 14:35:20 +02:00
Kconfig
local.h
Makefile
trace.c
trace.h