Re: [PATCH v2 3/3] vfio/pci: Check BAR resources before exporting a DMABUF

Leon Romanovsky
2026-04-26T11:16:11Z

On Thu, Apr 23, 2026 at 11:25:09AM -0700, Matt Evans wrote:
> A DMABUF exports access to BAR resources and, although they are
> requested at startup time, we need to ensure they really were reserved
> before exporting. Otherwise, it's possible to access unreserved
> resources through the export.
>
> Add a check to the DMABUF-creation path.
>
> Fixes: 5d74781ebc86c ("vfio/pci: Add dma-buf export support for MMIO regions")
> Signed-off-by: Matt Evans <mattev@meta.com>
> ---
> drivers/vfio/pci/vfio_pci_dmabuf.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>