1
0
Fork 0
alistair23-linux/drivers/vfio/pci
Eric Auger 30aea96ff1 vfio/pci: Move dummy_resources_list init in vfio_pci_probe()
[ Upstream commit 16b8fe4caf ]

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: 05f0c03fba ("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-01-06 14:48:36 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
trace.h vfio/pci: Cleanup license mess 2019-01-22 11:06:05 -07:00
vfio_pci.c vfio/pci: Move dummy_resources_list init in vfio_pci_probe() 2021-01-06 14:48:36 +01:00
vfio_pci_config.c vfio/pci: Decouple PCI_COMMAND_MEMORY bit checks from is_virtfn 2020-10-29 09:57:54 +01:00
vfio_pci_igd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vfio_pci_intrs.c vfio/pci: Clear token on bypass registration failure 2020-10-29 09:57:56 +01:00
vfio_pci_nvlink2.c vfio/pci/nvlink2: Do not attempt NPU2 setup on POWER8NVL NPU 2020-12-30 11:51:30 +01:00
vfio_pci_private.h vfio-pci: Invalidate mmaps and block MMIO access on disabled memory 2020-09-09 19:12:30 +02:00
vfio_pci_rdwr.c vfio-pci: Invalidate mmaps and block MMIO access on disabled memory 2020-09-09 19:12:30 +02:00