From: Alex Williamson <alex.williamson@redhat.com>
To: Greg Kurz <groug@kaod.org>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfio-pci/nvlink2: Fix potential VMA leak
Date: Mon, 6 May 2019 15:58:45 -0600 [thread overview]
Message-ID: <20190506155845.70f3b01d@x1.home> (raw)
In-Reply-To: <155568823785.601037.2151744205292679252.stgit@bahia.lan>
On Fri, 19 Apr 2019 17:37:17 +0200
Greg Kurz <groug@kaod.org> 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>
> ---
Applied to vfio next branch for v5.2 with Alexey's R-b. Thanks!
Alex
> 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;
>
next prev parent reply other threads:[~2019-05-06 22:00 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
2019-05-06 21:58 ` Alex Williamson [this message]
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=20190506155845.70f3b01d@x1.home \
--to=alex.williamson@redhat.com \
--cc=aik@ozlabs.ru \
--cc=groug@kaod.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).