]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / PM: Walk physical_node_list under physical_node_lock
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 6 Aug 2013 00:26:22 +0000 (02:26 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 6 Aug 2013 00:26:22 +0000 (02:26 +0200)
commit367d39b84b18f96de7e90a8ed6d93c3a47daa851
tree7f0f56d1d21be4ce727b3d2433f9379b6a363dc3
parent76db2fd471427b6e1827378e742d87ef3f389753
ACPI / PM: Walk physical_node_list under physical_node_lock

The list of physical devices corresponding to an ACPI device
object is walked by acpi_system_wakeup_device_seq_show() and
physical_device_enable_wakeup() without taking that object's
physical_node_lock mutex.  Since each of those functions may be
run at any time as a result of a user space action, the lack of
appropriate locking in them may lead to a kernel crash if that
happens during device hot-add or hot-remove involving the device
object in question.

Fix the issue by modifying acpi_system_wakeup_device_seq_show() and
physical_device_enable_wakeup() to use physical_node_lock as
appropriate.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: All <stable@vger.kernel.org>
drivers/acpi/proc.c