linux_dsm_epyc7002/drivers/pci/hotplug
Bjorn Helgaas 6f6f42466d PCI: shpchp: Manage SHPC unconditionally on non-ACPI systems
An SHPC can be operated either by platform firmware or by the OS.  The OS
uses a host bridge ACPI _OSC method to negotiate for control of SHPC.  If
firmware wants to prevent an OS from operating an SHPC, it must supply an
_OSC method that declines to grant SHPC ownership to the OS.

If acpi_pci_find_root() returns NULL, it means there's no ACPI host bridge
device (PNP0A03 or PNP0A08) and hence no _OSC method, so the OS is always
allowed to manage the SHPC.

Fix a NULL pointer dereference when CONFIG_ACPI=y but the current
hardware/firmware platform doesn't support ACPI.  In that case,
acpi_get_hp_hw_control_from_firmware() is implemented but
acpi_pci_find_root() returns NULL.

Fixes: 90cc0c3cc7 ("PCI: shpchp: Add shpchp_is_native()")
Link: https://lkml.kernel.org/r/20180621164715.28160-1-marc.zyngier@arm.com
Reported-by: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2018-06-26 08:22:45 -05:00
..
acpi_pcihp.c PCI: shpchp: Manage SHPC unconditionally on non-ACPI systems 2018-06-26 08:22:45 -05:00
acpiphp_core.c
acpiphp_glue.c ACPI / hotplug / PCI: Drop unnecessary parentheses 2018-06-04 12:08:06 -05:00
acpiphp_ibm.c More ACPI updates for v4.16-rc1 2018-02-09 09:44:25 -08:00
acpiphp.h
cpci_hotplug_core.c
cpci_hotplug_pci.c
cpci_hotplug.h
cpcihp_generic.c
cpcihp_zt5550.c
cpcihp_zt5550.h
cpqphp_core.c
cpqphp_ctrl.c PCI: cpqphp: Fix possible NULL pointer dereference 2018-02-28 14:35:54 -06:00
cpqphp_nvram.c
cpqphp_nvram.h
cpqphp_pci.c
cpqphp_sysfs.c
cpqphp.h
ibmphp_core.c PCI: ibmphp: Fix use-before-set in get_max_bus_speed() 2018-04-20 12:49:24 -05:00
ibmphp_ebda.c
ibmphp_hpc.c
ibmphp_pci.c
ibmphp_res.c
ibmphp.h
Kconfig PCI: shpchp: Convert SHPC to be builtin only 2018-06-02 00:18:28 -05:00
Makefile
pci_hotplug_core.c
pciehp_core.c PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume 2018-05-23 17:42:53 -05:00
pciehp_ctrl.c
pciehp_hpc.c Merge branch 'pci/hotplug' 2018-06-06 16:10:10 -05:00
pciehp_pci.c
pciehp.h PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume 2018-05-23 17:42:53 -05:00
pcihp_skeleton.c
pnv_php.c PCI: pnv_php: Add missing of_node_put() 2018-05-23 16:48:37 -05:00
rpadlpar_core.c
rpadlpar_sysfs.c
rpadlpar.h
rpaphp_core.c
rpaphp_pci.c
rpaphp_slot.c
rpaphp.h
s390_pci_hpc.c
sgi_hotplug.c
shpchp_core.c PCI: shpchp: Add shpchp_is_native() 2018-06-04 12:08:06 -05:00
shpchp_ctrl.c PCI: shpchp: Fix AMD POGO identification 2018-06-04 12:07:31 -05:00
shpchp_hpc.c
shpchp_pci.c
shpchp_sysfs.c
shpchp.h PCI: shpchp: Add shpchp_is_native() 2018-06-04 12:08:06 -05:00