]> git.baikalelectronics.ru Git - 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)
committerTakashi Iwai <tiwai@suse.de>
Wed, 13 Nov 2019 09:51:36 +0000 (10:51 +0100)
commit0f44c6e61de75571da018872cbd8c4c8a080f579
treea17360281ab0a47bf58eb41881fc1367a2b8395c
parentf4883836c940c81451e2703052a51bf4aff1fd00
ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()

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>
sound/core/pcm_lib.c