All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Bobroff <sbobroff@linux.ibm.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Greg Kurz <groug@kaod.org>, 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: Tue, 7 May 2019 11:52:44 +1000	[thread overview]
Message-ID: <20190507014915.GA10274@tungsten.ozlabs.ibm.com> (raw)
In-Reply-To: <20190506155845.70f3b01d@x1.home>

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

On Mon, May 06, 2019 at 03:58:45PM -0600, Alex Williamson wrote:
> 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

Should this have a fixes tag? e.g.:
Fixes: 7f92891778df ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver")

> >  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;
> > 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Sam Bobroff <sbobroff@linux.ibm.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	linuxppc-dev@lists.ozlabs.org, Greg Kurz <groug@kaod.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfio-pci/nvlink2: Fix potential VMA leak
Date: Tue, 7 May 2019 11:52:44 +1000	[thread overview]
Message-ID: <20190507014915.GA10274@tungsten.ozlabs.ibm.com> (raw)
In-Reply-To: <20190506155845.70f3b01d@x1.home>

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

On Mon, May 06, 2019 at 03:58:45PM -0600, Alex Williamson wrote:
> 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

Should this have a fixes tag? e.g.:
Fixes: 7f92891778df ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver")

> >  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;
> > 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-05-07  1:52 UTC|newest]

Thread overview: 11+ 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-19 15:37 ` Greg Kurz
2019-04-26  7:50 ` Alexey Kardashevskiy
2019-04-26  7:50   ` Alexey Kardashevskiy
2019-05-06 21:58 ` Alex Williamson
2019-05-06 21:58   ` Alex Williamson
2019-05-07  1:52   ` Sam Bobroff [this message]
2019-05-07  1:52     ` Sam Bobroff
2019-05-07  7:01     ` Greg Kurz
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=20190507014915.GA10274@tungsten.ozlabs.ibm.com \
    --to=sbobroff@linux.ibm.com \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.