acrn-kernel/drivers/pci/controller
Dexuan Cui 223fc53520 PCI: hv: Fix a crash in hv_pci_restore_msi_msg() during hibernation
commit 04bbe86324 upstream.

When a Linux VM with an assigned PCI device runs on Hyper-V, if the PCI
device driver is not loaded yet (i.e. MSI-X/MSI is not enabled on the
device yet), doing a VM hibernation triggers a panic in
hv_pci_restore_msi_msg() -> msi_lock_descs(&pdev->dev), because
pdev->dev.msi.data is still NULL.

Avoid the panic by checking if MSI-X/MSI is enabled.

Link: https://lore.kernel.org/r/20230816175939.21566-1-decui@microsoft.com
Fixes: dc2b453290 ("PCI: hv: Rework MSI handling")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: sathyanarayanan.kuppuswamy@linux.intel.com
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:43:02 +02:00
..
cadence
dwc PCI: qcom-ep: Switch MHI bus master clock off during L1SS 2023-09-13 09:42:45 +02:00
mobiveil
Kconfig
Makefile
pci-aardvark.c
pci-ftpci100.c
pci-host-common.c
pci-host-generic.c
pci-hyperv-intf.c
pci-hyperv.c PCI: hv: Fix a crash in hv_pci_restore_msi_msg() during hibernation 2023-09-13 09:43:02 +02:00
pci-ixp4xx.c
pci-loongson.c
pci-mvebu.c
pci-rcar-gen2.c
pci-tegra.c
pci-thunder-ecam.c
pci-thunder-pem.c
pci-v3-semi.c
pci-versatile.c
pci-xgene-msi.c
pci-xgene.c
pcie-altera-msi.c
pcie-altera.c
pcie-apple.c
pcie-brcmstb.c
pcie-hisi-error.c
pcie-iproc-bcma.c
pcie-iproc-msi.c
pcie-iproc-platform.c
pcie-iproc.c
pcie-iproc.h
pcie-mediatek-gen3.c
pcie-mediatek.c
pcie-microchip-host.c PCI: microchip: Correct the DED and SEC interrupt bit offsets 2023-09-13 09:42:46 +02:00
pcie-mt7621.c
pcie-rcar-ep.c
pcie-rcar-host.c
pcie-rcar.c
pcie-rcar.h
pcie-rockchip-ep.c
pcie-rockchip-host.c
pcie-rockchip.c
pcie-rockchip.h PCI: rockchip: Use 64-bit mask on MSI 64-bit PCI address 2023-09-13 09:43:00 +02:00
pcie-xilinx-cpm.c
pcie-xilinx-nwl.c
pcie-xilinx.c
vmd.c