From: Rafael J. Wysocki Date: Mon, 3 Feb 2014 01:22:07 +0000 (+0100) Subject: ACPI / hotplug / PCI: Remove entries from bus->devices in reverse order X-Git-Tag: v3.14-rc2~16^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d7c1b77dd59387070aab355532dd157f888325c;p=pandora-kernel.git ACPI / hotplug / PCI: Remove entries from bus->devices in reverse order According to the changelog of commit 29ed1f29b68a (PCI: pciehp: Fix null pointer deref when hot-removing SR-IOV device) it is unsafe to walk the bus->devices list of a PCI bus and remove devices from it in direct order, because that may lead to NULL pointer dereferences related to virtual functions. For this reason, change all of the bus->devices list walks in acpiphp_glue.c during which devices may be removed to be carried out in reverse order. Signed-off-by: Rafael J. Wysocki Tested-by: Mika Westerberg --- Reading git-diff-tree failed