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]
Date: Mon, 4 Mar 2024 10:27:28 -0800
From: Justin Tee <justintee8345@...il.com>
To: Muhammad Usama Anjum <usama.anjum@...labora.com>
Cc: Justin Tee <justin.tee@...adcom.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>, Hannes Reinecke <hare@...e.com>, 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 v2] scsi: lpfc: correct size for wqe for memset

> The wqe is of type lpfc_wqe128. It should be memset with the same type.
>
> Fixes: 6c621a2229b0 ("scsi: lpfc: Separate NVMET RQ buffer posting from IO resources SGL/iocbq/context")
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
> ---
> Changes since v1:
> - Use *wqe instead of type to find sizeof
> ---
>  drivers/scsi/lpfc/lpfc_nvmet.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
> index 8258b771bd009..561ced5503c63 100644
> --- a/drivers/scsi/lpfc/lpfc_nvmet.c
> +++ b/drivers/scsi/lpfc/lpfc_nvmet.c
> @@ -1586,7 +1586,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba)
>                 wqe = &nvmewqe->wqe;
>
>                 /* Initialize WQE */
> -               memset(wqe, 0, sizeof(union lpfc_wqe));
> +               memset(wqe, 0, sizeof(*wqe));
>
>                 ctx_buf->iocbq->cmd_dmabuf = NULL;
>                 spin_lock(&phba->sli4_hba.sgl_list_lock);
> --
> 2.39.2

Reviewed-by: Justin Tee <justintee8345@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ