]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
authorpaulhsia <paulhsia@chromium.org>
Tue, 12 Nov 2019 17:17:14 +0000 (01:17 +0800)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:23:19 +0000 (14:23 -0300)
commit43910f72b40ada048ec507fe8271e37ec3c186ca
tree18a7afb968cfdcb6d82b162e6ed429d66e577af0
parent1af0fcd429c750ecac6429c297bec570371bff1a
ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()

BugLink: https://bugs.launchpad.net/bugs/1856334
[ Upstream commit f5cdc9d4003a2f66ea57b3edd3e04acc2b1a4439 ]

If the nullity check for `substream->runtime` is outside of the lock
region, it is possible to have a null runtime in the critical section
if snd_pcm_detach_substream is called right before the lock.

Signed-off-by: paulhsia <paulhsia@chromium.org>
Link: https://lore.kernel.org/r/20191112171715.128727-2-paulhsia@chromium.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
sound/core/pcm_lib.c