From: Li Zefan <lizf@cn.fujitsu.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Paul Menage <menage@google.com>,
Jeremy Fitzhardinge <jeremy@xensource.com>,
Andi Kleen <ak@suse.de>, LKML <linux-kernel@vger.kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [PATCH] call_usermodehelper_setup() should use GFP_KERNEL
Date: Thu, 08 May 2008 15:23:27 +0800 [thread overview]
Message-ID: <4822AA6F.5040703@cn.fujitsu.com> (raw)
In-Reply-To: <20080508153337.0EEE.KOSAKI.MOTOHIRO@jp.fujitsu.com>
KOSAKI Motohiro wrote:
> Now, call_usermodehelper_setup() use GFP_ATOMIC.
> but it is slighly odd.
> because call_usermodehelper() is always called process context.
>
Are you sure? I found the following call chain:
static irqreturn_t power_handler(int irq, void *dev_id)
->orderly_poweroff(true);
->call_usermodehelper_setup()
> GFP_KERNEL is robust and better.
>
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> CC: "Paul Menage" <menage@google.com>
> CC: Li Zefan <lizf@cn.fujitsu.com>
> CC: Jeremy Fitzhardinge <jeremy@xensource.com>
> CC: Andi Kleen <ak@suse.de>
> CC: Rusty Russell <rusty@rustcorp.com.au>
>
> ---
> kernel/kmod.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: b/kernel/kmod.c
> ===================================================================
> --- a/kernel/kmod.c 2008-04-29 17:37:41.000000000 +0900
> +++ b/kernel/kmod.c 2008-05-06 20:20:02.000000000 +0900
> @@ -360,7 +360,7 @@ struct subprocess_info *call_usermodehel
> char **argv, char **envp)
> {
> struct subprocess_info *sub_info;
> - sub_info = kzalloc(sizeof(struct subprocess_info), GFP_ATOMIC);
> + sub_info = kzalloc(sizeof(struct subprocess_info), GFP_KERNEL);
> if (!sub_info)
> goto out;
>
>
>
>
>
next prev parent reply other threads:[~2008-05-08 7:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-08 6:41 [PATCH] call_usermodehelper_setup() should use GFP_KERNEL KOSAKI Motohiro
2008-05-08 7:23 ` Li Zefan [this message]
2008-05-08 7:31 ` KOSAKI Motohiro
2008-05-08 8:29 ` Andrew Morton
2008-05-08 9:40 ` KOSAKI Motohiro
2008-05-08 10:16 ` Jeremy Fitzhardinge
2008-05-08 10:38 ` KOSAKI Motohiro
2008-05-08 12:58 ` Jeremy Fitzhardinge
2008-05-08 23:46 ` KOSAKI Motohiro
2008-05-08 23:53 ` Jeremy Fitzhardinge
2008-05-09 0:04 ` KOSAKI Motohiro
2008-05-09 0:08 ` Jeremy Fitzhardinge
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=4822AA6F.5040703@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=ak@suse.de \
--cc=jeremy@xensource.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=rusty@rustcorp.com.au \
/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