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: <Y7asVSr5ERGCZedk@kili>
Date:   Thu, 5 Jan 2023 13:54:13 +0300
From:   Dan Carpenter <error27@...il.com>
To:     Souradeep Chowdhury <quic_schowdhu@...cinc.com>
Cc:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH 2/2] soc: qcom: dcc: Delete some bogus dead code

It feels very wrong to assign "cfg.sram_offset" to be out of bounds.
Fortunately, this is just dead code and can be deleted.

Signed-off-by: Dan Carpenter <error27@...il.com>
---
 drivers/soc/qcom/dcc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/qcom/dcc.c b/drivers/soc/qcom/dcc.c
index 1e2cbefc1655..681d55018e66 100644
--- a/drivers/soc/qcom/dcc.c
+++ b/drivers/soc/qcom/dcc.c
@@ -483,10 +483,8 @@ static int dcc_emit_config(struct dcc_drvdata *drvdata, unsigned int curr_list)
 	/* Update ram_cfg and check if the data will overstep */
 	drvdata->ram_cfg = (cfg.sram_offset + total_len) / 4;
 
-	if (cfg.sram_offset + total_len > drvdata->ram_size) {
-		cfg.sram_offset += total_len;
+	if (cfg.sram_offset + total_len > drvdata->ram_size)
 		goto overstep;
-	}
 
 	drvdata->ram_start = cfg.sram_offset / 4;
 	return 0;
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ