From 87e0ce68cc0216063c6329aca0c31961a33a5372 Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Tue, 5 Apr 2022 14:50:35 +0100
Subject: [PATCH] media: coda: assert bitstream mutex is locked in
coda_fill_bitstream
coda_fill_bitstream() must be called under the bitstream mutex.
Signed-off-by: Philipp Zabel
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
---
drivers/media/platform/chips-media/coda-bit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/chips-media/coda-bit.c b/drivers/media/platform/chips-media/coda-bit.c
index c484c00..804fc84 100644
--- a/drivers/media/platform/chips-media/coda-bit.c
+++ b/drivers/media/platform/chips-media/coda-bit.c
@@ -326,6 +326,8 @@ void coda_fill_bitstream(struct coda_ctx *ctx, struct list_head *buffer_list)
struct coda_buffer_meta *meta;
u32 start;
+ lockdep_assert_held(&ctx->bitstream_mutex);
+
if (ctx->bit_stream_param & CODA_BIT_STREAM_END_FLAG)
return;
--
2.7.4