diff options
| author | Lin Ming <[email protected]> | 2012-09-13 22:26:33 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2012-09-13 22:26:33 +0000 |
| commit | 40bf66ec9791f1452b90b82aadc3b6e6aee201f5 (patch) | |
| tree | 677ca8a83277992ed9b8ad2ac75239fccc7f9e2d /lib/dynamic_debug.c | |
| parent | ACPI / PM: Infer parent power state from child if unknown, v2 (diff) | |
| download | kernel-40bf66ec9791f1452b90b82aadc3b6e6aee201f5.tar.gz kernel-40bf66ec9791f1452b90b82aadc3b6e6aee201f5.zip | |
ACPI / PM: Fix resource_lock dead lock in acpi_power_on_device
Commit 0090def("ACPI: Add interface to register/unregister device
to/from power resources") used resource_lock to protect the devices list
that relies on power resource. It caused a mutex dead lock, as below
acpi_power_on ---> lock resource_lock
__acpi_power_on
acpi_power_on_device
acpi_power_get_inferred_state
acpi_power_get_list_state ---> lock resource_lock
This patch adds a new mutex "devices_lock" to protect the devices list
and calls acpi_power_on_device in acpi_power_on, instead of
__acpi_power_on, after the resource_lock is released.
[rjw: Changed data type of a boolean variable to bool.]
Signed-off-by: Lin Ming <[email protected]>
Signed-off-by: Aaron Lu <[email protected]>
Cc: [email protected]
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions
