android_kernel_xiaomi_sm8350/drivers/pci/hotplug
Alex Chiang a13307cef8 PCI: acpiphp: cleanup notify handler on all root bridges
During the development of the physical PCI slot patch series, Gary Hade
kept on reporting strange oopses due to interactions between pci_slot
and acpiphp.

	http://lkml.org/lkml/2007/11/28/319

find_root_bridges() unconditionally installs
handle_hotplug_event_bridge() as an ACPI_SYSTEM_NOTIFY handler for all
root bridges.

However, during module cleanup, remove_bridge() will only remove the
notify handler iff the root bridge had a hot-pluggable slot directly
underneath. That is:

	root bridge -> hotplug slot

But, if the topology looks like either of the following:

	root bridge -> non-hotplug slot
	root bridge -> p2p bridge -> hotplug slot

Then we currently do not remove the notify handler from that root
bridge.

This can cause a kernel oops if we modprobe acpiphp later and it gets
loaded somewhere else in memory. If the root bridge then receives a
hotplug event, it will then attempt to call a stale, non-existent notify
handler and we blow up.

Much thanks goes to Gary Hade for his persistent debugging efforts.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-07-02 11:27:30 -07:00
..
acpi_pcihp.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
acpiphp_core.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
acpiphp_glue.c PCI: acpiphp: cleanup notify handler on all root bridges 2008-07-02 11:27:30 -07:00
acpiphp_ibm.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
acpiphp.h PCI: hotplug: acpiphp: Remove unused variable from acpiphp 2008-02-01 15:04:20 -08:00
cpci_hotplug_core.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
cpci_hotplug_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
cpci_hotplug.h
cpcihp_generic.c PCI Hotplug: make cpcihp driver use modern apis 2008-04-20 21:46:56 -07:00
cpcihp_zt5550.c
cpcihp_zt5550.h
cpqphp_core.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
cpqphp_ctrl.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
cpqphp_nvram.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
cpqphp_nvram.h
cpqphp_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
cpqphp_sysfs.c
cpqphp.h PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
fakephp.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
ibmphp_core.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
ibmphp_ebda.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
ibmphp_hpc.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
ibmphp_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
ibmphp_res.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
ibmphp.h
Kconfig PCI Hotplug: the ibm driver is not dependant on PCI_LEGACY 2008-04-20 21:46:57 -07:00
Makefile PCI: hotplug: Link fakephp last 2008-02-01 15:04:20 -08:00
pci_hotplug_core.c pci hotplug core: add check of duplicate slot name 2008-05-27 15:43:40 -07:00
pciehp_core.c pciehp: add message about pciehp_slot_with_bus option 2008-05-27 15:43:47 -07:00
pciehp_ctrl.c pciehp: move msleep after power off 2008-05-27 15:43:33 -07:00
pciehp_hpc.c pciehp: move msleep after power off 2008-05-27 15:43:33 -07:00
pciehp_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
pciehp.h pciehp: fix slow probing 2008-05-27 15:43:16 -07:00
pcihp_skeleton.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
rpadlpar_core.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
rpadlpar_sysfs.c PCI: fix rpadlpar pci hotplug driver sysfs usage 2008-05-30 09:50:46 -07:00
rpadlpar.h
rpaphp_core.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
rpaphp_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
rpaphp_slot.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
rpaphp.h pci hotplug: fix rpaphp directory naming 2008-02-01 15:04:22 -08:00
sgi_hotplug.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
shpchp_core.c shpchp: add message about shpchp_slot_with_bus option 2008-05-27 15:42:55 -07:00
shpchp_ctrl.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
shpchp_hpc.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
shpchp_pci.c PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00
shpchp_sysfs.c
shpchp.h PCI: replace remaining __FUNCTION__ occurrences 2008-04-20 21:47:09 -07:00