diff options
author | Bob Moore <robert.moore@intel.com> | 2010-05-25 23:22:41 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-06-12 00:55:17 -0400 |
commit | 9cbfa18e8a7b34a32eddbd914a07f085962f50a8 (patch) | |
tree | 4ef8f4055af728372b94b1a9fb07b0eff09bea30 /drivers/acpi/acpica/exsystem.c | |
parent | d70326689b70b35527765bd3decbb1229459e928 (diff) |
ACPICA: Limit maximum time for Sleep() operator
To prevent accidental deep sleeps, limit the maximum time that
Sleep() will sleep. Configurable, default maximum is two seconds.
ACPICA bugzilla 854.
http://www.acpica.org/bugzilla/show_bug.cgi?id=854
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/exsystem.c')
-rw-r--r-- | drivers/acpi/acpica/exsystem.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsystem.c index 6d32e09327f1..675aaa91a770 100644 --- a/drivers/acpi/acpica/exsystem.c +++ b/drivers/acpi/acpica/exsystem.c | |||
@@ -201,6 +201,14 @@ acpi_status acpi_ex_system_do_sleep(u64 how_long) | |||
201 | 201 | ||
202 | acpi_ex_relinquish_interpreter(); | 202 | acpi_ex_relinquish_interpreter(); |
203 | 203 | ||
204 | /* | ||
205 | * For compatibility with other ACPI implementations and to prevent | ||
206 | * accidental deep sleeps, limit the sleep time to something reasonable. | ||
207 | */ | ||
208 | if (how_long > ACPI_MAX_SLEEP) { | ||
209 | how_long = ACPI_MAX_SLEEP; | ||
210 | } | ||
211 | |||
204 | acpi_os_sleep(how_long); | 212 | acpi_os_sleep(how_long); |
205 | 213 | ||
206 | /* And now we must get the interpreter again */ | 214 | /* And now we must get the interpreter again */ |