]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vfio-pci/nvlink2: Fix potential VMA leak
authorGreg Kurz <groug@kaod.org>
Fri, 19 Apr 2019 15:37:17 +0000 (17:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jun 2019 09:52:58 +0000 (11:52 +0200)
commitdcaa5e20015d63a1dd3bf1c2dd1c56d83010cd10
tree626db8a5ef796b59011a5fd16936eb75302f73f9
parent47e8097870ee4abdde1f77a4ccb033f88b0e24ad
vfio-pci/nvlink2: Fix potential VMA leak

[ Upstream commit 2c85f2bd519457073444ec28bbb4743a4e4237a7 ]

If vfio_pci_register_dev_region() fails then we should rollback
previous changes, ie. unmap the ATSD registers.

Fixes: 7f92891778df ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver")
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vfio/pci/vfio_pci_nvlink2.c