[PATCH] vfio-pci/nvlink2: Fix potential VMA leak

Sam Bobroff sbobroff at linux.ibm.com
Tue May 7 11:52:44 AEST 2019


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 at 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 at 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;
> > 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20190507/c7c2ea16/attachment.sig>


More information about the Linuxppc-dev mailing list