Thinkpad Suspend Powersave: Fix ACPI's GFP_KERNEL allocations in contexts that can sleep
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Theodore Y. Ts'o
This fixes a problem originally reported by Christian Borntraeger where
during the wakeup from a suspend-to-ram, several "sleeping function called from invalid context" warning messages are issued. Unlike a previous patch which attempted to solve this problem, we avoid doing anGFP_ATOMICkmalloc()except when explicitly necessary.Signed-off-by "Theodore Ts'o" <[email protected]>
Quoted 10 lines
Index:
src/drivers/acpi/osl.c
===================================================================
---src.orig/drivers/acpi/osl.c2005-03-14 09:38:15.000000000 -0500
+++src/drivers/acpi/osl.c2005-03-14 09:38:18.000000000 -0500
@@ -145,7 +145,7 @@
void *
acpi_os_allocate(acpi_size size)
{
- returnkmalloc(size, GFP_KERNEL);
+ returnkmalloc(size, in_atomic() ? GFP_ATOMIC : GFP_KERNEL);
We shouldn't do this. Please see
http://www.uwsg.iu.edu/hypermail/linux/kernel/0503.1/1205.html
Quoted 6 lines · Andrew Morton
Quoted 5 lines · Theodore Y. Ts'o
This fixes a problem originally reported by Christian Borntraeger where
during the wakeup from a suspend-to-ram, several "sleeping function called from invalid context" warning messages are issued. Unlike a previous patch which attempted to solve this problem, we avoid doing
anGFP_ATOMICkmalloc()except when explicitly necessary.
Len,
you indicated that you are going to address the S3 sleeping function issue after the development for 2.6.12 has started with an invasive but correct fix.
(http://marc.theaimsgroup.com/?l=acpi4linux&m=110978961501752&w=2)
Can you give an overview about your progress?
cheers
Christian