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>] [day] [month] [year] [list]
Message-ID: <20240205081758.923878-1-ming.qian@nxp.com>
Date: Mon,  5 Feb 2024 17:17:58 +0900
From: Ming Qian <ming.qian@....com>
To: mchehab@...nel.org,
	hverkuil-cisco@...all.nl
Cc: shawnguo@...nel.org,
	robh+dt@...nel.org,
	s.hauer@...gutronix.de,
	kernel@...gutronix.de,
	festevam@...il.com,
	linux-imx@....com,
	xiahong.bao@....com,
	eagle.zhou@....com,
	tao.jiang_2@....com,
	ming.qian@....nxp.com,
	linux-media@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] media: amphion: Abort vpu parsing directly in seek

Driver abort vpu decoding when both output and capture queues are off,
but if seek in parsing the sequence header, driver may miss aborting the
parsing. so just abort the vpu parsing directly in seek.

Meanwhile if capture is off unexpectedly, we still need to abort the
decoding and return capture buffers.

Signed-off-by: Ming Qian <ming.qian@....com>
---
 drivers/media/platform/amphion/vdec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/amphion/vdec.c b/drivers/media/platform/amphion/vdec.c
index 133d77d1ea0c..a57f9f4f3b87 100644
--- a/drivers/media/platform/amphion/vdec.c
+++ b/drivers/media/platform/amphion/vdec.c
@@ -1595,9 +1595,11 @@ static int vdec_stop_session(struct vpu_inst *inst, u32 type)
 	if (V4L2_TYPE_IS_OUTPUT(type)) {
 		vdec_update_state(inst, VPU_CODEC_STATE_SEEK, 0);
 		vdec->drain = 0;
+		vdec_abort(inst);
 	} else {
 		if (inst->state != VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE) {
-			vdec_abort(inst);
+			if (vb2_is_streaming(v4l2_m2m_get_src_vq(inst->fh.m2m_ctx)))
+				vdec_abort(inst);
 			vdec->eos_received = 0;
 		}
 		vdec_clear_slots(inst);
-- 
2.43.0-rc1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ