Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1640068 > unrolled thread

[PATCH] scsi: libfc: fix incorrect variable assingment

Started by"Gustavo A. R. Silva" <garsilva@embeddedor.com>
First post2017-05-12 00:30 +0200
Last post2017-05-17 03:20 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] scsi: libfc: fix incorrect variable assingment "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-05-12 00:30 +0200
    Re: [PATCH] scsi: libfc: fix incorrect variable assingment "Ewan D. Milne" <emilne@redhat.com> - 2017-05-12 14:30 +0200
    Re: [PATCH] scsi: libfc: fix incorrect variable assingment "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-05-17 03:20 +0200

#1640068 — [PATCH] scsi: libfc: fix incorrect variable assingment

From"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date2017-05-12 00:30 +0200
Subject[PATCH] scsi: libfc: fix incorrect variable assingment
Message-ID<tG4KR-3NL-5@gated-at.bofh.it>
Previous assignment was causing the use of the uninitialized variable
_explan_ inside fc_seq_ls_rjt() function, which in this particular
case is being called by fc_seq_els_rsp_send().

Addresses-Coverity-ID: 1398125
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/scsi/libfc/fc_rport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index b44c313..5203258 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -1422,7 +1422,7 @@ static void fc_rport_recv_rtv_req(struct fc_rport_priv *rdata,
 	fp = fc_frame_alloc(lport, sizeof(*rtv));
 	if (!fp) {
 		rjt_data.reason = ELS_RJT_UNAB;
-		rjt_data.reason = ELS_EXPL_INSUF_RES;
+		rjt_data.explan = ELS_EXPL_INSUF_RES;
 		fc_seq_els_rsp_send(in_fp, ELS_LS_RJT, &rjt_data);
 		goto drop;
 	}
-- 
2.5.0

[toc] | [next] | [standalone]


#1640424

From"Ewan D. Milne" <emilne@redhat.com>
Date2017-05-12 14:30 +0200
Message-ID<tGhRL-4rF-1@gated-at.bofh.it>
In reply to#1640068
On Thu, 2017-05-11 at 17:24 -0500, Gustavo A. R. Silva wrote:
> Previous assignment was causing the use of the uninitialized variable
> _explan_ inside fc_seq_ls_rjt() function, which in this particular
> case is being called by fc_seq_els_rsp_send().
> 
> Addresses-Coverity-ID: 1398125
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>  drivers/scsi/libfc/fc_rport.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
> index b44c313..5203258 100644
> --- a/drivers/scsi/libfc/fc_rport.c
> +++ b/drivers/scsi/libfc/fc_rport.c
> @@ -1422,7 +1422,7 @@ static void fc_rport_recv_rtv_req(struct fc_rport_priv *rdata,
>  	fp = fc_frame_alloc(lport, sizeof(*rtv));
>  	if (!fp) {
>  		rjt_data.reason = ELS_RJT_UNAB;
> -		rjt_data.reason = ELS_EXPL_INSUF_RES;
> +		rjt_data.explan = ELS_EXPL_INSUF_RES;
>  		fc_seq_els_rsp_send(in_fp, ELS_LS_RJT, &rjt_data);
>  		goto drop;
>  	}

s/assingment/assignment/

Reviewed-by: Ewan D. Milne <emilne@redhat.com>

[toc] | [prev] | [next] | [standalone]


#1642908

From"Martin K. Petersen" <martin.petersen@oracle.com>
Date2017-05-17 03:20 +0200
Message-ID<tHVN7-4OT-1@gated-at.bofh.it>
In reply to#1640068
Gustavo A.,

> Previous assignment was causing the use of the uninitialized variable
> _explan_ inside fc_seq_ls_rjt() function, which in this particular
> case is being called by fc_seq_els_rsp_send().

Applied to 4.12/scsi-fixes. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web