kernel_samsung_a53x/drivers/vfio
Alex Williamson a05ea12faa vfio/pci: Disable auto-enable of exclusive INTx IRQ
[ Upstream commit fe9a7082684eb059b925c535682e68c34d487d43 ]

Currently for devices requiring masking at the irqchip for INTx, ie.
devices without DisINTx support, the IRQ is enabled in request_irq()
and subsequently disabled as necessary to align with the masked status
flag.  This presents a window where the interrupt could fire between
these events, resulting in the IRQ incrementing the disable depth twice.
This would be unrecoverable for a user since the masked flag prevents
nested enables through vfio.

Instead, invert the logic using IRQF_NO_AUTOEN such that exclusive INTx
is never auto-enabled, then unmask as required.

Cc:  <stable@vger.kernel.org>
Fixes: 89e1f7d4c66d ("vfio: Add PCI device driver")
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20240308230557.805580-2-alex.williamson@redhat.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 09:22:45 +01:00
..
fsl-mc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mdev Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci vfio/pci: Disable auto-enable of exclusive INTx IRQ 2024-11-19 09:22:45 +01:00
platform vfio/platform: Disable virqfds on cleanup 2024-11-19 09:22:35 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vfio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vfio_iommu_spapr_tce.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vfio_iommu_type1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vfio_spapr_eeh.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virqfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00