media: coda: assert bitstream mutex is locked in coda_fill_bitstream
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 5 Apr 2022 13:50:35 +0000 (14:50 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 24 Apr 2022 07:44:38 +0000 (08:44 +0100)
coda_fill_bitstream() must be called under the bitstream mutex.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/chips-media/coda-bit.c

index c484c008ab027c0e76bf83a740abce999ceacad2..804fc84d5966f38fa7f8539d98a580a350dda89d 100644 (file)
@@ -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;