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:   Sun, 2 Oct 2022 09:48:46 -0700
From:   James Smart <jsmart2021@...il.com>
To:     Rafael Mendonca <rafaelmendsr@...il.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>,
        Gaurav Srivastava <gaurav.srivastava@...adcom.com>,
        Hannes Reinecke <hare@...e.de>,
        Muneendra Kumar <muneendra.kumar@...adcom.com>
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: lpfc: Fix memory leak in lpfc_create_port()

On 9/15/2022 8:59 PM, Rafael Mendonca wrote:
> Commit 5e633302ace1 ("scsi: lpfc: vmid: Add support for VMID in mailbox
> command") introduced allocations for the VMID resources in
> lpfc_create_port() after the call to scsi_host_alloc(). Upon failure on the
> VMID allocations, the new code would branch to the 'out' label, which
> returns NULL without unwinding anything, thus skipping the call to
> scsi_host_put().
> 
> Fix the problem by creating a separate label 'out_free_vmid' to unwind the
> VMID resources and make the 'out_put_shost' label call only
> scsi_host_put(), as was done before the introduction of allocations for
> VMID.
> 
> Fixes: 5e633302ace1 ("scsi: lpfc: vmid: Add support for VMID in mailbox command")
> Signed-off-by: Rafael Mendonca <rafaelmendsr@...il.com>
> ---
>   drivers/scsi/lpfc/lpfc_init.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 

Looks good

Reviewed-by: James Smart <jsmart2021@...il.com>

-- james


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ