diff options
author | David Shaohua Li <shaohua.li@intel.com> | 2005-08-03 23:46:33 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-03 23:50:36 -0400 |
commit | 11e981f1e02c2a36465cbb208b21cb8b6480f399 (patch) | |
tree | d812a362e9e530f0cfd7a189d79ede3e8d5a7f96 /drivers/acpi/osl.c | |
parent | 8066eff0a1a0703ad901dbe5646a47dbfc089ef2 (diff) | |
download | blackbird-op-linux-11e981f1e02c2a36465cbb208b21cb8b6480f399.tar.gz blackbird-op-linux-11e981f1e02c2a36465cbb208b21cb8b6480f399.zip |
[ACPI] S3 resume: avoid kmalloc() might_sleep oops symptom
ACPI now uses kmalloc(...,GPF_ATOMIC) during suspend/resume.
http://bugzilla.kernel.org/show_bug.cgi?id=3469
Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index bdd9f37f8101..7289da3c4db6 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -145,10 +145,14 @@ acpi_os_vprintf(const char *fmt, va_list args) #endif } +extern int acpi_in_resume; void * acpi_os_allocate(acpi_size size) { - return kmalloc(size, GFP_KERNEL); + if (acpi_in_resume) + return kmalloc(size, GFP_ATOMIC); + else + return kmalloc(size, GFP_KERNEL); } void |