From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Greg Kurz <groug@kaod.org>, linux-kernel@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org,
Michael Ellerman <mpe@ellerman.id.au>,
Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH] vfio-pci/nvlink2: Fix potential VMA leak
Date: Fri, 26 Apr 2019 17:50:22 +1000 [thread overview]
Message-ID: <d1a91bf1-d3b8-dd3b-a677-d0acc0dea277@ozlabs.ru> (raw)
In-Reply-To: <155568823785.601037.2151744205292679252.stgit@bahia.lan>
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@kaod.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@ozlabs.ru>
--
Alexey
next prev parent reply other threads:[~2019-04-26 7:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 15:37 [PATCH] vfio-pci/nvlink2: Fix potential VMA leak Greg Kurz
2019-04-26 7:50 ` Alexey Kardashevskiy [this message]
2019-05-06 21:58 ` Alex Williamson
2019-05-07 1:52 ` Sam Bobroff
2019-05-07 7:01 ` Greg Kurz
2019-05-07 17:25 ` Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1a91bf1-d3b8-dd3b-a677-d0acc0dea277@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=groug@kaod.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).