* [PATCH] scsi: scsi_dh_alua: signedness bug in alua_rtpg()
@ 2021-06-03 12:33 Dan Carpenter
2021-06-04 13:03 ` Martin Wilck
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-06-03 12:33 UTC (permalink / raw)
To: James E.J. Bottomley, Hannes Reinecke
Cc: Martin K. Petersen, Ewan D. Milne, Martin Wilck, Bart Van Assche,
John Pittman, linux-scsi, kernel-janitors
The "retval" variable needs to be signed for the error handling to work.
Fixes: 7e26e3ea0287 ("scsi: scsi_dh_alua: Check for negative result value")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 7baee18ebd03..37d06f993b76 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -518,7 +518,8 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg)
int len, k, off, bufflen = ALUA_RTPG_SIZE;
int group_id_old, state_old, pref_old, valid_states_old;
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;
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: scsi_dh_alua: signedness bug in alua_rtpg()
2021-06-03 12:33 [PATCH] scsi: scsi_dh_alua: signedness bug in alua_rtpg() Dan Carpenter
@ 2021-06-04 13:03 ` Martin Wilck
2021-06-08 1:48 ` Martin K. Petersen
2021-06-16 3:48 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin Wilck @ 2021-06-04 13:03 UTC (permalink / raw)
To: Dan Carpenter, James E.J. Bottomley, Hannes Reinecke
Cc: Martin K. Petersen, Ewan D. Milne, Bart Van Assche, John Pittman,
linux-scsi, kernel-janitors
On Do, 2021-06-03 at 15:33 +0300, Dan Carpenter wrote:
> The "retval" variable needs to be signed for the error handling to
> work.
>
> Fixes: 7e26e3ea0287 ("scsi: scsi_dh_alua: Check for negative result
> value")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
> ---
> drivers/scsi/device_handler/scsi_dh_alua.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c
> b/drivers/scsi/device_handler/scsi_dh_alua.c
> index 7baee18ebd03..37d06f993b76 100644
> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
> @@ -518,7 +518,8 @@ static int alua_rtpg(struct scsi_device *sdev,
> struct alua_port_group *pg)
> int len, k, off, bufflen = ALUA_RTPG_SIZE;
> int group_id_old, state_old, pref_old, valid_states_old;
> 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;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: scsi_dh_alua: signedness bug in alua_rtpg()
2021-06-03 12:33 [PATCH] scsi: scsi_dh_alua: signedness bug in alua_rtpg() Dan Carpenter
2021-06-04 13:03 ` Martin Wilck
@ 2021-06-08 1:48 ` Martin K. Petersen
2021-06-16 3:48 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-06-08 1:48 UTC (permalink / raw)
To: Dan Carpenter
Cc: James E.J. Bottomley, Hannes Reinecke, Martin K. Petersen,
Ewan D. Milne, Martin Wilck, Bart Van Assche, John Pittman,
linux-scsi, kernel-janitors
Dan,
> The "retval" variable needs to be signed for the error handling to work.
Applied to 5.14/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: scsi_dh_alua: signedness bug in alua_rtpg()
2021-06-03 12:33 [PATCH] scsi: scsi_dh_alua: signedness bug in alua_rtpg() Dan Carpenter
2021-06-04 13:03 ` Martin Wilck
2021-06-08 1:48 ` Martin K. Petersen
@ 2021-06-16 3:48 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-06-16 3:48 UTC (permalink / raw)
To: Hannes Reinecke, Dan Carpenter, James E.J. Bottomley
Cc: Martin K . Petersen, Bart Van Assche, Martin Wilck,
kernel-janitors, linux-scsi, Ewan D. Milne, John Pittman
On Thu, 3 Jun 2021 15:33:20 +0300, Dan Carpenter wrote:
> The "retval" variable needs to be signed for the error handling to work.
Applied to 5.14/scsi-queue, thanks!
[1/1] scsi: scsi_dh_alua: signedness bug in alua_rtpg()
https://git.kernel.org/mkp/scsi/c/80927822e8b6
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-16 3:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 12:33 [PATCH] scsi: scsi_dh_alua: signedness bug in alua_rtpg() Dan Carpenter
2021-06-04 13:03 ` Martin Wilck
2021-06-08 1:48 ` Martin K. Petersen
2021-06-16 3:48 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).