Re: [PATCH v2 3/3] vfio/pci: Check BAR resources before exporting a DMABUF
From: Leon Romanovsky
Date: Sun Apr 26 2026 - 07:16:17 EST
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@xxxxxxxx>
> ---
> drivers/vfio/pci/vfio_pci_dmabuf.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>