From: Andrew Morton <akpm@osdl.org>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: linux-kernel@vger.kernel.org, linux-thinkpad@linux-thinkpad.org,
benh@kernel.crashing.org, len.brown@intel.com,
volker.braun@physik.hu-berlin.de
Subject: Re: [PATCH 1/2] Thinkpad Suspend Powersave: Fix ACPI's GFP_KERNEL allocations in contexts that can sleep
Date: Wed, 16 Mar 2005 13:29:52 -0800 [thread overview]
Message-ID: <20050316132952.3af7cff8.akpm@osdl.org> (raw)
In-Reply-To: <2.518178082@mit.edu>
"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
next parent reply other threads:[~2005-03-16 21:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1.518178082@mit.edu>
[not found] ` <2.518178082@mit.edu>
2005-03-16 21:29 ` Andrew Morton [this message]
2005-03-16 21:57 ` Christian Borntraeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050316132952.3af7cff8.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-thinkpad@linux-thinkpad.org \
--cc=tytso@mit.edu \
--cc=volker.braun@physik.hu-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome