]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: amphion: add lock around vdec_g_fmt
authorMing Qian <ming.qian@nxp.com>
Tue, 1 Nov 2022 08:04:20 +0000 (16:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:12 +0000 (13:32 +0100)
commite9fbed19ad17a88ed74c749d398e1c4d69302346
tree191c97002dac8789feb1acdb1d04e62f81b150d3
parent2bf8461ee33c30a5a53d9ed6df780dc5c35d7c4f
media: amphion: add lock around vdec_g_fmt

[ Upstream commit 8480dd5fb3c82b5887d456b3fbe4201d99231814 ]

the capture format may be changed when
sequence header is parsed,
it may be read and write in the same time,
add lock around vdec_g_fmt to synchronize it

Fixes: 6de8d628df6e ("media: amphion: add v4l2 m2m vpu decoder stateful driver")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/amphion/vdec.c