linux-stable/sound/hda
Pierre-Louis Bossart e6818963e0 ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign()
commit 1465d06a6d 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-25 09:49:08 +01:00
..
ext ALSA: hda: hdac_ext_stream: fix potential locking issues 2021-11-25 09:49:08 +01:00
array.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
hda_bus_type.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
hdac_bus.c ALSA: hda: add link_power op to hdac_bus_ops 2021-02-08 15:56:35 +01:00
hdac_component.c ALSA: hda/i915 - fix list corruption with concurrent probes 2020-10-09 16:46:04 +02:00
hdac_controller.c ALSA: hda: avoid write to STATESTS if controller is in reset 2021-10-12 18:05:28 +02:00
hdac_device.c ALSA: hda: fix a runtime pm issue in SOF when integrated GPU is disabled 2020-09-02 19:26:39 +02:00
hdac_i915.c ALSA: hda/i915 - fix list corruption with concurrent probes 2020-10-09 16:46:04 +02:00
hdac_regmap.c ALSA: hda: fix kernel-doc warnings 2021-03-02 10:21:36 +01:00
hdac_stream.c ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign() 2021-11-25 09:49:08 +01:00
hdac_sysfs.c ALSA: hda: Constify static attribute_group 2021-01-31 09:50:11 +01:00
hdmi_chmap.c ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs 2020-02-18 10:15:41 +01:00
intel-dsp-config.c ALSA: intel-dsp-config: add quirk for APL/GLK/TGL devices based on ES8336 codec 2021-11-25 09:48:27 +01:00
intel-nhlt.c ALSA: hda: ignore invalid NHLT table 2021-03-04 09:14:36 +01:00
intel-sdw-acpi.c ALSA: hda: intel-sdw-acpi: add missing include files 2021-03-02 15:33:17 +01:00
Kconfig ALSA: hda: Revert "ALSA: hda: Allow setting preallocation again for x86" 2021-03-19 16:55:11 +01:00
local.h ALSA: hda: Unexport some local helper functions 2020-05-16 08:29:49 +02:00
Makefile ALSA: hda: move Intel SoundWire ACPI scan to dedicated module 2021-03-02 15:33:00 +01:00
trace.c ALSA: hda - Re-add tracepoints to HD-audio core driver 2015-03-23 13:17:58 +01:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00