mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] debugobjects: Use GFP_ATOMIC to allocate when initializing
Date: Sun, 1 Apr 2012 19:36:45 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1204011935190.2542@ionos> (raw)
In-Reply-To: <1333228972-4594-1-git-send-email-levinsasha928@gmail.com>

On Sat, 31 Mar 2012, Sasha Levin wrote:

> During the init stage, we have only 1 cpu and run with IRQs disabled,
> we can't allocate with GFP_KERNEL.
> 
> This also fixes the related warning on boot.

Hrmm. This should not be the case. In early boot GFP_KERNEL
allocations should not trigger a warning when interrupts are
disabled. Which kind of warning are you observing ?

Thanks,

	tglx

 
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> ---
>  lib/debugobjects.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/debugobjects.c b/lib/debugobjects.c
> index 0ab9ae8..ece5e06 100644
> --- a/lib/debugobjects.c
> +++ b/lib/debugobjects.c
> @@ -1020,7 +1020,7 @@ static int __init debug_objects_replace_static_objects(void)
>  	int i, cnt = 0;
>  
>  	for (i = 0; i < ODEBUG_POOL_SIZE; i++) {
> -		obj = kmem_cache_zalloc(obj_cache, GFP_KERNEL);
> +		obj = kmem_cache_zalloc(obj_cache, GFP_ATOMIC);
>  		if (!obj)
>  			goto free;
>  		hlist_add_head(&obj->node, &objects);
> -- 
> 1.7.8.5
> 
> 

  parent reply	other threads:[~2012-04-01 17:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-31 21:22 Sasha Levin
2012-04-01  2:17 ` Yong Zhang
2012-04-01 17:36 ` Thomas Gleixner [this message]
2012-04-01 17:53   ` Sasha Levin
2012-04-02  9:12     ` Thomas Gleixner
2012-04-02 18:35       ` Peter Zijlstra
2012-04-02 18:38         ` Pekka Enberg
2012-04-02 19:05         ` Sasha Levin

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=alpine.LFD.2.02.1204011935190.2542@ionos \
    --to=tglx@linutronix.de \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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