lkml.org 
[lkml]   [2005]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] Thinkpad Suspend Powersave: Fix ACPI's GFP_KERNEL allocations in contexts that can sleep
"Theodore Y. Ts'o" <tytso@mit.edu> wrote:
>
> 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 an
> GFP_ATOMIC kmalloc() except when explicitly necessary.
>
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
>
> Index: src/drivers/acpi/osl.c
> ===================================================================
> --- src.orig/drivers/acpi/osl.c 2005-03-14 09:38:15.000000000 -0500
> +++ src/drivers/acpi/osl.c 2005-03-14 09:38:18.000000000 -0500
> @@ -145,7 +145,7 @@
> void *
> acpi_os_allocate(acpi_size size)
> {
> - return kmalloc(size, GFP_KERNEL);
> + return kmalloc(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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.038 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site