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: <20230506122032.2090153-1-U201911841@hust.edu.cn>
Date:   Sat,  6 May 2023 20:20:30 +0800
From:   Zhong Yong <U201911841@...t.edu.cn>
To:     Sathya Prakash <sathya.prakash@...adcom.com>,
        Sreekanth Reddy <sreekanth.reddy@...adcom.com>,
        Suganath Prabu Subramani 
        <suganath-prabu.subramani@...adcom.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>
Cc:     hust-os-kernel-patches@...glegroups.com,
        Zhong Yong <U201911841@...t.edu.cn>,
        Dongliang Mu <dzm91@...t.edu.cn>,
        MPT-FusionLinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] scsi: mpt3sas: Fix missing unwind goto in mpt3sas_config_update_driver_trigger_pg3()

Smatch warns:
drivers/scsi/mpt3sas/mpt3sas_config.c:2478
mpt3sas_config_update_driver_trigger_pg3() warn: missing unwind goto?

Fix this by assigning '-EFAULT' to 'rc' and
changing the direct return to a goto 'out'.

Fixes: 2a5c3a35c156 ("scsi: mpt3sas: Add persistent SCSI sense trigger page")
Signed-off-by: Zhong Yong <U201911841@...t.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@...t.edu.cn>
---
The issue is found by static analysis and the patch remains untested.
---
 drivers/scsi/mpt3sas/mpt3sas_config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c b/drivers/scsi/mpt3sas/mpt3sas_config.c
index d114ef381c44..a426d086044a 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_config.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_config.c
@@ -2475,7 +2475,8 @@ mpt3sas_config_update_driver_trigger_pg3(struct MPT3SAS_ADAPTER *ioc,
 		    ioc_err(ioc,
 		    "%s: Failed to get trigger pg3, ioc_status(0x%04x)\n",
 		    __func__, ioc_status));
-		return -EFAULT;
+		rc = -EFAULT;
+		goto out;
 	}
 
 	if (set) {
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ