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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231214021401.26474-1-cw9316.lee@samsung.com>
Date:   Thu, 14 Dec 2023 11:14:01 +0900
From:   Chanwoo Lee <cw9316.lee@...sung.com>
To:     agross@...nel.org, andersson@...nel.org, konrad.dybcio@...aro.org,
        mani@...nel.org, jejb@...ux.ibm.com, martin.petersen@...cle.com,
        p.zabel@...gutronix.de, linux-arm-msm@...r.kernel.org,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     grant.jung@...sung.com, jt77.jang@...sung.com,
        dh0421.hwang@...sung.com, sh043.lee@...sung.com,
        ChanWoo Lee <cw9316.lee@...sung.com>,
        Andrew Halaney <ahalaney@...hat.com>
Subject: [PATCH v2] scsi: ufs: qcom: Re-fix for error handling

From: ChanWoo Lee <cw9316.lee@...sung.com>

I modified the code to handle errors.

The error handling code has been changed from the patch below.
-'commit 031312dbc695 ("scsi: ufs: ufs-qcom: Remove unnecessary goto statements")'

This is the case I checked.
* ufs_qcom_clk_scale_notify -> 'ufs_qcom_clk_scale_up_/down_pre_change' error -> return 0;

It is unknown whether the above commit was intended to change error handling.
However, if it is not an intended fix, a patch may be needed.

Signed-off-by: ChanWoo Lee <cw9316.lee@...sung.com>
Reviewed-by: Andrew Halaney <ahalaney@...hat.com>
---
v1->v2: Remove things already in progress
 1) ufs_qcom_host_reset -> 'reset_control_deassert' error -> return 0;
   -> https://lore.kernel.org/linux-arm-msm/20231208065902.11006-8-manivannan.sadhasivam@linaro.org/#t
 2) ufs_qcom_init_lane_clks -> 'ufs_qcom_host_clk_get(tx_lane1_sync_clk)' error -> return 0;
   -> https://lore.kernel.org/linux-arm-msm/20231208065902.11006-2-manivannan.sadhasivam@linaro.org/
---
---
 drivers/ufs/host/ufs-qcom.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 96cb8b5b4e66..17e24270477d 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1516,9 +1516,11 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
 			err = ufs_qcom_clk_scale_up_pre_change(hba);
 		else
 			err = ufs_qcom_clk_scale_down_pre_change(hba);
-		if (err)
-			ufshcd_uic_hibern8_exit(hba);
 
+		if (err) {
+			ufshcd_uic_hibern8_exit(hba);
+			return err;
+		}
 	} else {
 		if (scale_up)
 			err = ufs_qcom_clk_scale_up_post_change(hba);
-- 
2.29.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ