linux-stable/drivers/pci
Thomas Gleixner d5e79d872b PCI/MSI: Destroy sysfs before freeing entries
commit 3735459037 upstream.

free_msi_irqs() frees the MSI entries before destroying the sysfs entries
which are exposing them. Nothing prevents a concurrent free while a sysfs
file is read and accesses the possibly freed entry.

Move the sysfs release ahead of freeing the entries.

Fixes: 1c51b50c29 ("PCI/MSI: Export MSI mode using attributes, not kobjects")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Bjorn Helgaas <helgaas@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/87sfw5305m.ffs@tglx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-18 19:17:14 +01:00
..
controller PCI: j721e: Fix j721e_pcie_probe() error path 2021-11-18 19:17:06 +01:00
endpoint pci-v5.15-changes 2021-09-07 19:13:42 -07:00
hotplug s390/pci: fix zpci_zdev_put() on reserve 2021-10-04 09:49:10 +02:00
pcie pci-v5.15-changes 2021-09-07 19:13:42 -07:00
switch PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
access.c
ats.c PCI: Allow PASID on fake PCIe devices without TLP prefixes 2021-08-26 14:21:42 -05:00
bus.c
ecam.c PCI: Dynamically map ECAM regions 2021-06-16 17:20:40 -05:00
host-bridge.c PCI: VMD: ACPI: Make ACPI companion lookup work for VMD bus 2021-09-02 17:59:58 +02:00
iov.c Merge branch 'pci/virtualization' 2021-07-06 10:56:26 -05:00
irq.c
Kconfig PCI: only build xen-pcifront in PV-enabled environments 2021-09-20 17:01:11 +02:00
Makefile PCI: Apply CONFIG_PCI_DEBUG to entire drivers/pci hierarchy 2021-02-09 15:10:20 -06:00
mmap.c
msi.c PCI/MSI: Destroy sysfs before freeing entries 2021-11-18 19:17:14 +01:00
of.c PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges' 2021-08-04 12:20:00 +01:00
p2pdma.c Merge branch 'pci/sysfs' 2021-07-06 10:56:25 -05:00
pci-acpi.c PCI: ACPI: Check parent pointer in acpi_pci_find_companion() 2021-10-07 18:42:44 +02:00
pci-bridge-emul.c PCI: pci-bridge-emul: Fix emulation of W1C bits 2021-11-18 19:16:04 +01:00
pci-bridge-emul.h PCI: pci-bridge-emul: Add PCIe Root Capabilities Register 2021-08-05 10:51:49 +01:00
pci-driver.c VFIO update for v5.15-rc1 2021-09-02 13:41:33 -07:00
pci-label.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
pci.c PCI: Do not enable AtomicOps on VFs 2021-11-18 19:17:08 +01:00
pci.h pci-v5.15-changes 2021-09-07 19:13:42 -07:00
probe.c Merge branch 'remotes/lorenzo/pci/hyper-v' 2021-09-02 14:56:47 -05:00
proc.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
quirks.c PCI: Mark Atheros QCA6174 to avoid bus reset 2021-11-18 19:15:58 +01:00
remove.c PCI: Remove reset_fn field from pci_dev 2021-08-17 17:44:38 -05:00
rom.c
search.c PCI: Remove WARN_ON(in_interrupt()) 2021-02-10 16:46:29 -06:00
setup-bus.c
setup-irq.c
setup-res.c PCI: Decline to resize resources if boot config must be preserved 2021-01-12 16:39:52 -06:00
slot.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
syscall.c PCI: Return int from pciconfig_read() syscall 2021-08-03 16:55:48 -05:00
vc.c
vpd.c PCI/VPD: Defer VPD sizing until first access 2021-09-15 16:26:13 -05:00
xen-pcifront.c Merge branch 'stable/for-linus-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb 2021-09-03 10:34:44 -07:00