]> git.karo-electronics.de Git - linux-beck.git/commit
PCI: acpiphp: Use list_for_each_entry_safe() in acpiphp_sanitize_bus()
authorYijing Wang <wangyijing@huawei.com>
Fri, 12 Apr 2013 05:44:17 +0000 (05:44 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 12 Apr 2013 21:38:25 +0000 (15:38 -0600)
commitd65eba6a7a769bb939303969267cbf1c916358f5
treea440a76282198945d081550115861a6f6e820048
parent981cf9ea9a6a6c422e51fc04bedad00b7792ccbc
PCI: acpiphp: Use list_for_each_entry_safe() in acpiphp_sanitize_bus()

Function acpiphp_sanitize_bus() may call pci_stop_and_remove_bus_device(),
which in turn may remove device from bus->devices list. So walk the
bus->devices list with list_for_each_entry_safe().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Toshi Kani <toshi.kani@hp.com>
drivers/pci/hotplug/acpiphp_glue.c