From: Rafael J. Wysocki Date: Sat, 9 Feb 2013 14:29:11 +0000 (+0100) Subject: ACPI / scan: Make acpi_bus_hot_remove_device() acquire the scan lock X-Git-Tag: v3.9-rc1~146^2~7^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f058cdf4cf3e5181172455f90fc73f2127b6ddf8;p=pandora-kernel.git ACPI / scan: Make acpi_bus_hot_remove_device() acquire the scan lock The ACPI scan lock has been introduced to prevent acpi_bus_scan() and acpi_bus_trim() from running in parallel with each other for overlapping ACPI namespace scopes. However, it is not sufficient to do that, because if acpi_bus_scan() is run (for an overlapping namespace scope) right after the acpi_bus_trim() in acpi_bus_hot_remove_device(), the subsequent eject will remove devices without removing the corresponding struct acpi_device objects (and possibly companion "physical" device objects). Therefore acpi_bus_hot_remove_device() has to acquire the scan lock before carrying out the bus trimming and hold it through the evaluation of _EJ0, so make that happen. Signed-off-by: Rafael J. Wysocki Acked-by: Toshi Kani --- Reading git-diff-tree failed