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: <20201110064650.143800-1-frkoenig@chromium.org>
Date:   Tue, 10 Nov 2020 06:46:51 +0000
From:   Fritz Koenig <frkoenig@...omium.org>
To:     linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-kernel@...r.kernel.org, stanimir.varbanov@...aro.org,
        vgarodia@...eaurora.org, dikshita@...eaurora.org,
        acourbot@...omium.org, tfiga@...omium.org
Cc:     Fritz Koenig <frkoenig@...omium.org>
Subject: [PATCH] venus: guard load_scale

load_scale can only be safely called after
the encoder has been initialized.

Signed-off-by: Fritz Koenig <frkoenig@...omium.org>
---
 drivers/media/platform/qcom/venus/pm_helpers.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/platform/qcom/venus/pm_helpers.h b/drivers/media/platform/qcom/venus/pm_helpers.h
index aa2f6afa23544..32e27db1fa740 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.h
+++ b/drivers/media/platform/qcom/venus/pm_helpers.h
@@ -35,6 +35,10 @@ static inline int venus_pm_load_scale(struct venus_inst *inst)
 	if (!core->pm_ops || !core->pm_ops->load_scale)
 		return 0;
 
+	if (inst->session_type == VIDC_SESSION_TYPE_ENC &&
+	    inst->enc_state == VENUS_ENC_STATE_INIT)
+		return 0;
+
 	return core->pm_ops->load_scale(inst);
 }
 
-- 
2.29.2.299.gdc1121823c-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ