linux/arch/s390/pci
Niklas Schnelle be54b750c3 s390/pci: Fix missing check for zpci_create_device() error return
commit 42420c50c6 upstream.

The zpci_create_device() function returns an error pointer that needs to
be checked before dereferencing it as a struct zpci_dev pointer. Add the
missing check in __clp_add() where it was missed when adding the
scan_list in the fixed commit. Simply not adding the device to the scan
list results in the previous behavior.

Cc: stable@vger.kernel.org
Fixes: 0467cdde8c ("s390/pci: Sort PCI functions prior to creating virtual busses")
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Gerd Bayer <gbayer@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-05-18 08:24:47 +02:00
..
Makefile s390/pci: Stop usurping pdev->dev.groups 2024-08-09 14:58:27 -05:00
pci.c s390/pci: Fix leak of struct zpci_dev when zpci_add_device() fails 2024-12-14 20:04:16 +01:00
pci_bus.c s390/pci: Fix zpci_bus_is_isolated_vf() for non-VFs 2025-04-20 10:15:59 +02:00
pci_bus.h PCI: s390: Fix use-after-free of PCI resources with per-function hotplug 2023-03-13 09:15:11 +01:00
pci_clp.c s390/pci: Fix missing check for zpci_create_device() error return 2025-05-18 08:24:47 +02:00
pci_debug.c iommu/s390: Implement blocking domain 2024-12-05 14:02:03 +01:00
pci_event.c s390/pci: Fix leak of struct zpci_dev when zpci_add_device() fails 2024-12-14 20:04:16 +01:00
pci_insn.c KVM: s390: pci: provide routines for enabling/disabling interrupt forwarding 2022-07-11 09:54:32 +02:00
pci_iov.c s390/pci: Fix handling of isolated VFs 2025-02-21 14:01:36 +01:00
pci_iov.h s390/pci: Fix handling of isolated VFs 2025-02-21 14:01:36 +01:00
pci_irq.c s390/pci: Allow allocation of more than 1 MSI interrupt 2024-07-23 15:54:58 +02:00
pci_kvm_hook.c KVM: s390: pci: Hook to access KVM lowlevel from VFIO 2022-08-29 13:29:28 +02:00
pci_mmio.c s390/pci: Fix s390_mmio_read/write syscall page fault handling 2025-04-20 10:15:28 +02:00
pci_sysfs.c s390/pci: Stop usurping pdev->dev.groups 2024-08-09 14:58:27 -05:00