lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211108142404.598968-1-benjamin.gaignard@collabora.com>
Date:   Mon,  8 Nov 2021 15:24:04 +0100
From:   Benjamin Gaignard <benjamin.gaignard@...labora.com>
To:     p.zabel@...gutronix.de, mchehab@...nel.org
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel@...labora.com,
        Benjamin Gaignard <benjamin.gaignard@...labora.com>
Subject: [PATCH] media: coda: Keep metas sync with hardware fifo

After updating the output fifo position be sure that metas are also
synchronised with this position.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...labora.com>
---
 drivers/media/platform/coda/coda-bit.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index c484c008ab02..28c56286b0de 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -2315,6 +2315,12 @@ static void coda_finish_decode(struct coda_ctx *ctx)
 	/* Update kfifo out pointer from coda bitstream read pointer */
 	coda_kfifo_sync_from_device(ctx);
 
+	/*
+	 * After updating the read pointer, we need to check if
+	 * any metas are consumed and should be released.
+	 */
+	coda_decoder_drop_used_metas(ctx);
+
 	/*
 	 * in stream-end mode, the read pointer can overshoot the write pointer
 	 * by up to 512 bytes
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ