]> git.baikalelectronics.ru Git - kernel.git/commit
x86/PCI: VMD: Synchronize with RCU freeing MSI IRQ descs
authorKeith Busch <keith.busch@intel.com>
Thu, 4 Aug 2016 22:09:09 +0000 (16:09 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 19 Sep 2016 18:14:05 +0000 (13:14 -0500)
commit3cf1ad227a0488cad7e1deed288d5228af65dd62
treeb159d9b1004faceb210b73be19dd66125e964d43
parent2d0cd4bc022cb1249d13c56e4c557e69daff7e8f
x86/PCI: VMD: Synchronize with RCU freeing MSI IRQ descs

Fix a potential race when disabling MSI/MSI-X on a VMD domain device.  If
the VMD interrupt service is running, it may see a disabled IRQ.  We can
synchronize RCU just before freeing the MSI descriptor.  This is safe since
the irq_desc lock isn't held, and the descriptor is valid even though it is
disabled.  After vmd_msi_free(), though, the handler is reinitialized to
handle_bad_irq(), so we can't let the VMD ISR's list iteration see the
disabled IRQ after this.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by Jon Derrick: <jonathan.derrick@intel.com>
arch/x86/pci/vmd.c