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: <d1a91bf1-d3b8-dd3b-a677-d0acc0dea277@ozlabs.ru>
Date:   Fri, 26 Apr 2019 17:50:22 +1000
From:   Alexey Kardashevskiy <aik@...abs.ru>
To:     Greg Kurz <groug@...d.org>, linux-kernel@...r.kernel.org
Cc:     linuxppc-dev@...ts.ozlabs.org,
        Michael Ellerman <mpe@...erman.id.au>,
        Alex Williamson <alex.williamson@...hat.com>
Subject: Re: [PATCH] vfio-pci/nvlink2: Fix potential VMA leak



On 20/04/2019 01:37, Greg Kurz wrote:
> If vfio_pci_register_dev_region() fails then we should rollback
> previous changes, ie. unmap the ATSD registers.
> 
> Signed-off-by: Greg Kurz <groug@...d.org>
> ---
>  drivers/vfio/pci/vfio_pci_nvlink2.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/vfio/pci/vfio_pci_nvlink2.c b/drivers/vfio/pci/vfio_pci_nvlink2.c
> index 32f695ffe128..50fe3c4f7feb 100644
> --- a/drivers/vfio/pci/vfio_pci_nvlink2.c
> +++ b/drivers/vfio/pci/vfio_pci_nvlink2.c
> @@ -472,6 +472,8 @@ int vfio_pci_ibm_npu2_init(struct vfio_pci_device *vdev)
>  	return 0;
>  
>  free_exit:
> +	if (data->base)
> +		memunmap(data->base);
>  	kfree(data);
>  
>  	return ret;
> 

Reviewed-by: Alexey Kardashevskiy <aik@...abs.ru>


-- 
Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ