From 24e66c606609a22e744148f6e308ea027fc8f179 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 19 Jul 2021 16:32:23 +0200 Subject: [PATCH] 4.19-stable patches added patches: scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch --- ...alua-fix-signedness-bug-in-alua_rtpg.patch | 33 +++++++++++++++++++ queue-4.19/series | 1 + 2 files changed, 34 insertions(+) create mode 100644 queue-4.19/scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch diff --git a/queue-4.19/scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch b/queue-4.19/scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch new file mode 100644 index 00000000000..4d3b75fc331 --- /dev/null +++ b/queue-4.19/scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch @@ -0,0 +1,33 @@ +From 80927822e8b6be46f488524cd7d5fe683de97fc4 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Thu, 3 Jun 2021 15:33:20 +0300 +Subject: scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg() + +From: Dan Carpenter + +commit 80927822e8b6be46f488524cd7d5fe683de97fc4 upstream. + +The "retval" variable needs to be signed for the error handling to work. + +Link: https://lore.kernel.org/r/YLjMEAFNxOas1mIp@mwanda +Fixes: 7e26e3ea0287 ("scsi: scsi_dh_alua: Check for negative result value") +Reviewed-by: Martin Wilck +Signed-off-by: Dan Carpenter +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/device_handler/scsi_dh_alua.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/scsi/device_handler/scsi_dh_alua.c ++++ b/drivers/scsi/device_handler/scsi_dh_alua.c +@@ -522,7 +522,8 @@ static int alua_rtpg(struct scsi_device + struct alua_port_group *tmp_pg; + int len, k, off, bufflen = ALUA_RTPG_SIZE; + unsigned char *desc, *buff; +- unsigned err, retval; ++ unsigned err; ++ int retval; + unsigned int tpg_desc_tbl_off; + unsigned char orig_transition_tmo; + unsigned long flags; diff --git a/queue-4.19/series b/queue-4.19/series index 0c1634f67ca..3c0d70d3a44 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -418,3 +418,4 @@ mips-disable-branch-profiling-in-boot-decompress.o.patch perf-report-fix-task-and-stat-with-pipe-input.patch mips-vdso-invalid-gic-access-through-vdso.patch net-bridge-multicast-fix-pim-hello-router-port-marking-race.patch +scsi-scsi_dh_alua-fix-signedness-bug-in-alua_rtpg.patch -- 2.47.3