diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2021-09-24 22:24:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-26 12:39:22 +0300 |
commit | 6718f79c40fd9f2788b0d12deb64562fcbece984 (patch) | |
tree | 2e70e7d0344ea3eecb34599db0d3ccbabecc3fdd /include/linux/perf_event.h | |
parent | f751fb54f2bc71cab118855358f0f660ea934b4d (diff) | |
download | linux-6718f79c40fd9f2788b0d12deb64562fcbece984.tar.xz |
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>
Diffstat (limited to 'include/linux/perf_event.h')
0 files changed, 0 insertions, 0 deletions