]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / EC / PM: Close race between EC and resume from hibernation
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 4 Mar 2010 00:52:58 +0000 (01:52 +0100)
committerLen Brown <len.brown@intel.com>
Mon, 8 Mar 2010 19:15:51 +0000 (14:15 -0500)
commit062b9c247cac7d67257e7fd7e4874dc14cea9882
treee0350530685e0719d4318f052982aa4340a00650
parentd5421672e4299b107d4a75da787d3700d8be8d67
ACPI / EC / PM: Close race between EC and resume from hibernation

There is a race between resume from hibernation and the EC driver
that may result in restoring the hibernation image in the middle of
an EC transaction in progress, which in turn may lead to
unpredictable behavior of the platform.

To remove that race condition, add a helpers for suspending and
resuming EC transactions in a safe way to be executed by the ACPI
platform hibernate pre-restore and restore cleanup callbacks.

http://bugzilla.kernel.org/show_bug.cgi?id=14668

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/ec.c
drivers/acpi/internal.h
drivers/acpi/sleep.c