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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240904-camss_on_sc7280_rb3gen2_vision_v2_patches-v1-3-b18ddcd7d9df@quicinc.com>
Date: Wed, 4 Sep 2024 16:40:09 +0530
From: Vikram Sharma <quic_vikramsa@...cinc.com>
To: Robert Foss <rfoss@...nel.org>, Todor Tomov <todor.too@...il.com>,
        "Bryan
 O'Donoghue" <bryan.odonoghue@...aro.org>,
        Mauro Carvalho Chehab
	<mchehab@...nel.org>,
        Rob Herring <robh@...nel.org>,
        Krzysztof Kozlowski
	<krzk+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Kapatrala Syed
	<akapatra@...cinc.com>,
        Hariram Purushothaman <hariramp@...cinc.com>,
        "Bjorn
 Andersson" <andersson@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        <cros-qcom-dts-watchers@...omium.org>,
        Catalin Marinas
	<catalin.marinas@....com>,
        Will Deacon <will@...nel.org>
CC: <linux-arm-msm@...r.kernel.org>, <linux-media@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        Vikram Sharma
	<quic_vikramsa@...cinc.com>, <stable@...r.kernel.org>
Subject: [PATCH 03/10] media: qcom: camss: Fix potential crash if domain
 attach fails

Fix a potential crash in camss by ensuring detach is skipped if attach
is unsuccessful.

Fixes: d89751c61279 ("media: qcom: camss: Add support for named power-domains")
CC: stable@...r.kernel.org
Signed-off-by: Vikram Sharma <quic_vikramsa@...cinc.com>
---
 drivers/media/platform/qcom/camss/camss.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index d64985ca6e88..447b89d07e8a 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -2132,7 +2132,7 @@ static int camss_configure_pd(struct camss *camss)
 							    camss->res->pd_name);
 		if (IS_ERR(camss->genpd)) {
 			ret = PTR_ERR(camss->genpd);
-			goto fail_pm;
+			goto fail_pm_attach;
 		}
 	}
 
@@ -2149,7 +2149,7 @@ static int camss_configure_pd(struct camss *camss)
 			ret = -ENODEV;
 		else
 			ret = PTR_ERR(camss->genpd);
-		goto fail_pm;
+		goto fail_pm_attach;
 	}
 	camss->genpd_link = device_link_add(camss->dev, camss->genpd,
 					    DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME |
@@ -2164,6 +2164,7 @@ static int camss_configure_pd(struct camss *camss)
 fail_pm:
 	dev_pm_domain_detach(camss->genpd, true);
 
+fail_pm_attach:
 	return ret;
 }
 

-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ