ASoC: SOF: Intel: hda-dai: fix potential locking issue
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 24 Sep 2021 19:24:17 +0000 (14:24 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 09:39:09 +0000 (10:39 +0100)
commit0c6daf4799613b16dd4ad86fbc34f719ceb69911
tree3429f9138f48f29f218d836ed2ec98482059d05f
parent19d193c5761a0f6fc03be00447bc209f8d266d8b
ASoC: SOF: Intel: hda-dai: fix potential locking issue

[ Upstream commit a20f3b10de61add5e14b6ce4df982f4df2a4cbbc ]

The initial hdac_stream code was adapted a third time with the same
locking issues. Move the spin_lock outside the loops and make sure the
fields are protected on read/write.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210924192417.169243-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/sof/intel/hda-dai.c