ASoC: stm32: spdifrx: fix race condition in irq handler
authorOlivier Moysan <olivier.moysan@st.com>
Wed, 4 Dec 2019 15:43:32 +0000 (16:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:46:59 +0000 (19:46 +0100)
commit7835b07257bb005c67a0d6e585db0d12c4c468a0
treee19de9b0e096e825f500896b5187bae9f0b9fc07
parent5063469c3d8a7c8d6f1a714ea287250a0e1b3956
ASoC: stm32: spdifrx: fix race condition in irq handler

commit 86e1956af4c863d653136fd6e5694adf2054dbaa upstream.

When snd_pcm_stop() is called in interrupt routine,
substream context may have already been released.
Add protection on substream context.

Fixes: 03e4d5d56fa5 ("ASoC: stm32: Add SPDIFRX support")

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Link: https://lore.kernel.org/r/20191204154333.7152-3-olivier.moysan@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/stm/stm32_spdifrx.c