linux-stable/drivers/vfio
Alex Williamson 083e750c9f vfio/fsl-mc: Block calling interrupt handler without trigger
[ Upstream commit 7447d911af ]

The eventfd_ctx trigger pointer of the vfio_fsl_mc_irq object is
initially NULL and may become NULL if the user sets the trigger
eventfd to -1.  The interrupt handler itself is guaranteed that
trigger is always valid between request_irq() and free_irq(), but
the loopback testing mechanisms to invoke the handler function
need to test the trigger.  The triggering and setting ioctl paths
both make use of igate and are therefore mutually exclusive.

The vfio-fsl-mc driver does not make use of irqfds, nor does it
support any sort of masking operations, therefore unlike vfio-pci
and vfio-platform, the flow can remain essentially unchanged.

Cc: Diana Craciun <diana.craciun@oss.nxp.com>
Cc:  <stable@vger.kernel.org>
Fixes: cc0ee20bd9 ("vfio/fsl-mc: trigger an interrupt via eventfd")
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20240308230557.805580-8-alex.williamson@redhat.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-03 15:19:47 +02:00
..
fsl-mc vfio/fsl-mc: Block calling interrupt handler without trigger 2024-04-03 15:19:47 +02:00
mdev vfio/mdev: Fix a null-ptr-deref bug for mdev_unregister_parent() 2023-10-06 14:56:45 +02:00
pci vfio/pci: Create persistent INTx handler 2024-04-03 15:19:46 +02:00
platform vfio/platform: Create persistent IRQ handlers 2024-04-03 15:19:46 +02:00
Kconfig
Makefile
container.c vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations 2024-04-03 15:19:34 +02:00
iova_bitmap.c iommufd/iova_bitmap: Consider page offset for the pages to be pinned 2024-03-01 13:26:35 +01:00
vfio.h
vfio_iommu_spapr_tce.c
vfio_iommu_type1.c vfio/type1: fix cap_migration information leak 2023-09-13 09:42:47 +02:00
vfio_main.c
vfio_spapr_eeh.c
virqfd.c vfio: Introduce interface to flush virqfd inject workqueue 2024-04-03 15:19:46 +02:00