kernel_optimize_test/sound/hda/ext
Pierre-Louis Bossart f751fb54f2 ALSA: hda: hdac_ext_stream: fix potential locking issues
commit 868ddfcef31ff93ea8961b2e81ea7fe12f6f144b upstream.

The code for hdac_ext_stream seems inherited from hdac_stream, and
similar locking issues are present: the use of the bus->reg_lock
spinlock is inconsistent, with only writes to specific fields being
protected.

Apply similar fix as in hdac_stream by protecting all accesses to
'link_locked' and 'decoupled' fields, with a new helper
snd_hdac_ext_stream_decouple_locked() added to simplify code
changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210924192417.169243-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-26 10:39:22 +01:00
..
hdac_ext_bus.c ASoC: hdac: make SOF HDA codec driver probe deterministic 2020-09-21 23:57:24 +01:00
hdac_ext_controller.c ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link() 2020-11-03 14:11:38 +01:00
hdac_ext_stream.c ALSA: hda: hdac_ext_stream: fix potential locking issues 2021-11-26 10:39:22 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00