diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-04-12 05:44:28 +0000 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-16 10:27:14 -0600 |
commit | 3d54a3160fb6ba877324ffffa5d301dec8038fd9 (patch) | |
tree | 03589d2bc780b2a410336fb5b47cb1af94f8b340 /block/blk-timeout.c | |
parent | ad41dd9dd0c8ca1876f30b62c5c79625ffe83174 (diff) |
PCI: acpiphp: Protect acpiphp data structures from concurrent updates
Now acpiphp_enumerate_slots() and acpiphp_remove_slots() may be invoked
concurrently by the PCI core, so add a bridge_mutex and reference count
mechanism to protect acpiphp bridge/slot/function data structures.
To avoid deadlock, handle_hotplug_event_bridge() will requeue the
hotplug event onto the kacpi_hotplug_wq by calling alloc_acpi_hp_work().
But the workaround has introduced a minor race window because the
'bridge' passed to _handle_hotplug_event_bridge() may have already been
destroyed when _handle_hotplug_event_bridge() is actually executed by
the kacpi_hotplug_wq. So hold a reference count on the passed 'bridge'.
Fix the same issue for handle_hotplug_event_func() too.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Yijing Wang <wangyijing@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>
Diffstat (limited to 'block/blk-timeout.c')
0 files changed, 0 insertions, 0 deletions