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: <1459899431-22564-1-git-send-email-bastienphilbert@gmail.com>
Date:	Tue,  5 Apr 2016 19:37:11 -0400
From:	Bastien Philbert <bastienphilbert@...il.com>
To:	sathya.prakash@...adcom.com
Cc:	chaitra.basappa@...adcom.com,
	suganath-prabu.subramani@...adcom.com, jejb@...ux.vnet.ibm.com,
	martin.petersen@...cle.com, MPT-FusionLinux.pdl@...adcom.com,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] mpt3sas:Make sure mpt3sas adapter has been reset in scsih_resume

This fixes the issue in the function scih_resume that we assume
that the mpt3sas adapter has been reset properly with a call to
mpt3sas_base_hard_reset_handler by checking if this function
call returns a error code and exit adpater resume prematurely

Signed-off-by: Bastien Philbert <bastienphilbert@...il.com>
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index e0e4920..be2a7c3 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -8892,7 +8892,11 @@ scsih_resume(struct pci_dev *pdev)
 	if (r)
 		return r;
 
-	mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, SOFT_RESET);
+	r = mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, SOFT_RESET);
+	if (r) {
+		mpt3sas_base_free_resources(ioc);
+		return r;
+	}
 	scsi_unblock_requests(shost);
 	mpt3sas_base_start_watchdog(ioc);
 	return 0;
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ