TencentOS-kernel/drivers/vfio/pci
Eric Auger 324a787e3c vfio/pci: Move dummy_resources_list init in vfio_pci_probe()
[ Upstream commit 16b8fe4caf499ae8e12d2ab1b1324497e36a7b83 ]

In case an error occurs in vfio_pci_enable() before the call to
vfio_pci_probe_mmaps(), vfio_pci_disable() will  try to iterate
on an uninitialized list and cause a kernel panic.

Lets move to the initialization to vfio_pci_probe() to fix the
issue.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Fixes: 05f0c03fbac1 ("vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive")
CC: Stable <stable@vger.kernel.org> # v4.7+
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-16 16:43:49 +08:00
..
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
trace.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vfio_pci.c vfio/pci: Move dummy_resources_list init in vfio_pci_probe() 2021-03-16 16:43:49 +08:00
vfio_pci_config.c vfio/pci: Decouple PCI_COMMAND_MEMORY bit checks from is_virtfn 2021-03-16 16:39:00 +08:00
vfio_pci_igd.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vfio_pci_intrs.c vfio/pci: Clear token on bypass registration failure 2021-03-16 16:39:03 +08:00
vfio_pci_nvlink2.c vfio/pci/nvlink2: Do not attempt NPU2 setup on POWER8NVL NPU 2021-03-16 16:43:21 +08:00
vfio_pci_private.h vfio-pci: Invalidate mmaps and block MMIO access on disabled memory 2021-03-16 16:35:36 +08:00
vfio_pci_rdwr.c vfio-pci: Invalidate mmaps and block MMIO access on disabled memory 2021-03-16 16:35:36 +08:00