Merge ../to-linus-stable/
[sfrench/cifs-2.6.git] / drivers / acpi / osl.c
index cb16cc11fee88ad7a27c28af650edbb6697e098a..0d11d6e6abd6d652efab6c2831a81b340c7a50f7 100644 (file)
@@ -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