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: <5a0172a7-1a02-47d4-86c7-f5fd22e9767c@wanadoo.fr>
Date: Fri, 1 Mar 2024 17:39:21 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Muhammad Usama Anjum <usama.anjum@...labora.com>,
 James Smart <james.smart@...adcom.com>,
 Dick Kennedy <dick.kennedy@...adcom.com>,
 "James E.J. Bottomley" <jejb@...ux.ibm.com>,
 "Martin K. Petersen" <martin.petersen@...cle.com>,
 Justin Tee <justin.tee@...adcom.com>
Cc: kernel@...labora.com, kernel-janitors@...r.kernel.org,
 James Smart <jsmart2021@...il.com>, linux-scsi@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: lpfc: correct size for cmdwqe/rspwqe for memset

Le 01/03/2024 à 15:44, Muhammad Usama Anjum a écrit :
> The cmdwqe and rspwqe are of type lpfc_wqe128. They should be memset
> with the same type.
> 
> Fixes: 61910d6a5243 ("scsi: lpfc: SLI path split: Refactor CT paths")
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
> ---
>   drivers/scsi/lpfc/lpfc_bsg.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
> index d80e6e81053b0..8caf54aa20391 100644
> --- a/drivers/scsi/lpfc/lpfc_bsg.c
> +++ b/drivers/scsi/lpfc/lpfc_bsg.c
> @@ -3169,10 +3169,10 @@ lpfc_bsg_diag_loopback_run(struct bsg_job *job)
>   	}
>   
>   	cmdwqe = &cmdiocbq->wqe;
> -	memset(cmdwqe, 0, sizeof(union lpfc_wqe));
> +	memset(cmdwqe, 0, sizeof(union lpfc_wqe128));

Hi,

maybe even:
	memset(cmdwqe, 0, sizeof(*cmdwqe));

Same below and in your other patch.

just my 2c,

CJ


>   	if (phba->sli_rev < LPFC_SLI_REV4) {
>   		rspwqe = &rspiocbq->wqe;
> -		memset(rspwqe, 0, sizeof(union lpfc_wqe));
> +		memset(rspwqe, 0, sizeof(union lpfc_wqe128));
>   	}
>   
>   	INIT_LIST_HEAD(&head);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ