From: Rafael J. Wysocki Date: Sat, 15 Jun 2013 22:38:30 +0000 (+0200) Subject: ACPI / dock: Take ACPI scan lock in write_undock() X-Git-Tag: v3.10-rc7~10^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8112006f41fd76ddf4988f8ddd904563db85613c;p=pandora-kernel.git ACPI / dock: Take ACPI scan lock in write_undock() Since commit 3757b94 (ACPI / hotplug: Fix concurrency issues and memory leaks) acpi_bus_scan() and acpi_bus_trim() must always be called under acpi_scan_lock, but currently the following scenario violating that requirement is possible: write_undock() handle_eject_request() hotplug_dock_devices() dock_remove_acpi_device() acpi_bus_trim() Fix that by making write_undock() acquire acpi_scan_lock before calling handle_eject_request() as appropriate (begin_undock() is under the lock too in analogy with acpi_dock_deferred_cb()). Signed-off-by: Rafael J. Wysocki Cc: 3.9+ Acked-by: Toshi Kani --- Reading git-diff-tree failed