1
linux/arch/x86/pci
Samasth Norway Ananda dbc3171194 x86/PCI: Check pcie_find_root_port() return for NULL
If pcie_find_root_port() is unable to locate a Root Port, it will return
NULL. Check the pointer for NULL before dereferencing it.

This particular case is in a quirk for devices that are always below a Root
Port, so this won't avoid a problem and doesn't need to be backported, but
check as a matter of style and to prevent copy/paste mistakes.

Link: https://lore.kernel.org/r/20240812202659.1649121-1-samasth.norway.ananda@oracle.com
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
[bhelgaas: drop Fixes: and explain why there's no problem in this case]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
2024-08-21 15:28:08 -05:00
..
acpi.c x86/pci: Add MCFG debug logging 2023-12-05 10:56:39 -06:00
amd_bus.c range.h: Move resource API and constant to respective files 2023-08-18 10:19:00 -07:00
broadcom_bus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
bus_numa.c range.h: Move resource API and constant to respective files 2023-08-18 10:19:00 -07:00
bus_numa.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ce4100.c x86/pci/ce4100: Remove unused 'struct sim_reg_op' 2024-05-08 09:17:17 +02:00
common.c x86/PCI: Add kernel cmdline options to use/ignore E820 reserved regions 2022-05-19 14:26:55 -05:00
direct.c x86/pci: Simplify code by using the new dmi_get_bios_year() helper 2018-02-23 08:20:30 +01:00
early.c PCI: Make early dump functionality generic 2018-06-29 20:06:07 -05:00
fixup.c x86/PCI: Check pcie_find_root_port() return for NULL 2024-08-21 15:28:08 -05:00
i386.c x86/PCI: Make a kernel-doc comment a normal one 2020-11-27 13:43:09 +01:00
init.c x86/pci: Create PCI/MSI irqdomain after x86_init.pci.arch_init() 2021-02-10 22:06:47 +01:00
intel_mid_pci.c - Flip the logic to add feature names to /proc/cpuinfo to having to 2024-07-15 20:25:16 -07:00
irq.c x86/PCI: Use struct_size() in pirq_convert_irt_table() 2023-07-13 11:33:20 -05:00
legacy.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
Makefile x86/PCI: Replace deprecated EXTRA_CFLAGS with ccflags-y 2019-11-21 07:49:27 -06:00
mmconfig_32.c x86/pci: Rename 'MMCONFIG' to 'ECAM', use pr_fmt 2023-12-05 10:56:46 -06:00
mmconfig_64.c x86/pci: Reorder pci_mmcfg_arch_map() definition before calls 2023-12-05 10:57:03 -06:00
mmconfig-shared.c x86/pci: Skip early E820 check for ECAM region 2024-05-16 14:35:08 -05:00
numachip.c x86/PCI: Add pci_numachip_init() declaration 2021-08-12 14:07:31 -05:00
olpc.c x86/pci: Remove OLPC dead code 2024-05-03 17:09:44 -05:00
pcbios.c x86/pci: Clean up open-coded PCIBIOS return code mangling 2023-12-01 16:50:59 -06:00
sta2x11-fixup.c x86: sta2x11: include header for sta2x11_get_instance() prototype 2023-12-10 17:21:43 -08:00
xen.c x86/pci/xen: Fix PCIBIOS_* return code handling 2024-06-24 19:21:25 +02:00