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-next>] [day] [month] [year] [list]
Message-ID:
 <PU4P216MB2281AC76382B9FCC96105070FD562@PU4P216MB2281.KORP216.PROD.OUTLOOK.COM>
Date: Fri, 1 Nov 2024 00:27:56 +0000
From: (Çлý) ÀåÀÎ±Ô (ÄÄÇ»ÅÍ°øÇаú)
	<ingyujang25@...st.ac.kr>
To: "James.Bottomley@...senPartnership.com"
	<James.Bottomley@...senPartnership.com>, "martin.petersen@...cle.com"
	<martin.petersen@...cle.com>
CC: "njavali@...vell.com" <njavali@...vell.com>,
	"GR-QLogic-Storage-Upstream@...vell.com"
	<GR-QLogic-Storage-Upstream@...vell.com>, "linux-scsi@...r.kernel.org"
	<linux-scsi@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: [PATCH] qla2xxx: Fix  START_SP_W_RETRIES checks _rval with positive
 EAGAIN

From 6f450e20d42c29c623654553831bcba74a566da4 Mon Sep 17 00:00:00 2001
From: Ingyu Jang <ingyujang25@...st.ac.kr>
Date: Fri, 1 Nov 2024 09:17:10 +0900
Subject: [PATCH] qla2xxx: Fix  START_SP_W_RETRIES checks _rval with positive
 EAGAIN

The START_SP_W_RETRIES macro incorrectly checked _rval with a positive
EAGAIN, despite qla2x00_start_sp consistently returning -EAGAIN for
retriable conditions. This mismatch could cause improper looping
behavior, failing to retry as intended and potentially leading to
unintended results in the system.

This patch fixes the macro to handle EAGAIN as -EAGAIN, ensuring
consistent error handling.
This change prevents any potential misinterpretation that could
introduce unexpected behavior.

Signed-off-by: Ingyu Jang <ingyujang25@...st.ac.kr>
---
 drivers/scsi/qla2xxx/qla_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 31fc6a0eca3e..763bdcc47567 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2063,7 +2063,7 @@ static void qla_marker_sp_done(srb_t *sp, int res)
 			break; \
 		} \
 		_rval = qla2x00_start_sp(_sp); \
-		if (_rval == EAGAIN) \
+		if (_rval == -EAGAIN) \
 			msleep(1); \
 		else \
 			break; \
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ