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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a89c886c57f99c3141e69bc3f1f1ea9b@mail.gmail.com>
Date:	Tue, 22 Mar 2016 17:12:21 +0530
From:	Sumit Saxena <sumit.saxena@...adcom.com>
To:	Colin King <colin.king@...onical.com>,
	Kashyap Desai <kashyap.desai@...gotech.com>,
	Sumit Saxena <sumit.saxena@...gotech.com>,
	James Bottomley <jbottomley@...n.com>,
	"Martin K . Petersen" <martin.petersen@...cle.com>,
	megaraidlinux.pdl@...gotech.com, linux-scsi@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org
Subject: RE: [PATCH] megaraid_sas: fix missing { }, nullify kbuff_arr[i] only
 when necessary

> -----Original Message-----
> From: Colin King [mailto:colin.king@...onical.com]
> Sent: Sunday, March 20, 2016 10:34 PM
> To: Kashyap Desai; Sumit Saxena; James Bottomley; Martin K . Petersen;
> megaraidlinux.pdl@...gotech.com; linux-scsi@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Subject: [PATCH] megaraid_sas: fix missing { }, nullify kbuff_arr[i]
only when
> necessary
>
> From: Colin Ian King <colin.king@...onical.com>
>
> Fix missing { } on if statement, this change will nullify kbuff_arr[i]
only where
> necessary as the code intended.
>
> detected using static analysis with smatch
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
> b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 69d375b..e6ebc7a 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -6656,12 +6656,13 @@ out:
>  	}
>
>  	for (i = 0; i < ioc->sge_count; i++) {
> -		if (kbuff_arr[i])
> +		if (kbuff_arr[i]) {
>  			dma_free_coherent(&instance->pdev->dev,
>
le32_to_cpu(kern_sge32[i].length),
>  					  kbuff_arr[i],
>
> le32_to_cpu(kern_sge32[i].phys_addr));
>  			kbuff_arr[i] = NULL;
> +		}
>  	}
>
>  	megasas_return_cmd(instance, cmd);

Acked-by: Sumit Saxena <sumit.saxena@...adcom.com>

> --
> 2.7.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ