[GIT PULL] VFIO fixes for v7.1-rc4

From: Alex Williamson

Date: Fri May 15 2026 - 14:06:45 EST


Hi Linus,

Please include for rc4. Thanks!

The following changes since commit 5d6919055dec134de3c40167a490f33c74c12581:

Linux 7.1-rc3 (2026-05-10 14:08:09 -0700)

are available in the Git repository at:

https://github.com/awilliam/linux-vfio.git tags/vfio-v7.1-rc4

for you to fetch changes up to 702809dabdecca807bdd50cfdcc1c980feb2ba62:

vfio/pci: Check BAR resources before exporting a DMABUF (2026-05-14 11:39:03 -0600)

----------------------------------------------------------------
VFIO fixes for v7.1-rc4

- Convert vfio-pci BAR resource requests and iomaps initialization
from a lazy, on-demand model to an eager pre-allocation model to
avoid races while preserving legacy error behavior. Fix unchecked
barmap access in dma-buf export path. (Matt Evans)

- Introduce an implicit unsigned cast in converting vfio-pci device
offsets to region indexes, closing a potential out-of-bounds
access through the vfio_pci_ioeventfd() interface. (Matt Evans)

- Fix a dma-buf kref underflow and stuck wait_for_completion() when
closing a previously revoked dma-buf. (Alex Williamson)

----------------------------------------------------------------
Alex Williamson (1):
vfio/pci: fix dma-buf kref underflow after revoke

Matt Evans (3):
vfio/pci: Make VFIO_PCI_OFFSET_TO_INDEX() return unsigned
vfio/pci: Set up BAR resources and maps in vfio_pci_core_enable()
vfio/pci: Check BAR resources before exporting a DMABUF

drivers/vfio/pci/vfio_pci_core.c | 37 ++++++++++++++++++++++++++++++++-
drivers/vfio/pci/vfio_pci_dmabuf.c | 42 ++++++++++++++++++++------------------
drivers/vfio/pci/vfio_pci_rdwr.c | 26 +++++++----------------
include/linux/vfio_pci_core.h | 2 +-
4 files changed, 66 insertions(+), 41 deletions(-)