mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, Sasha Levin <levinsasha928@gmail.com>
Subject: [PATCH] debugobjects: Use GFP_ATOMIC to allocate when initializing
Date: Sat, 31 Mar 2012 17:22:52 -0400	[thread overview]
Message-ID: <1333228972-4594-1-git-send-email-levinsasha928@gmail.com> (raw)

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.

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


             reply	other threads:[~2012-03-31 19:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-31 21:22 Sasha Levin [this message]
2012-04-01  2:17 ` Yong Zhang
2012-04-01 17:36 ` Thomas Gleixner
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=1333228972-4594-1-git-send-email-levinsasha928@gmail.com \
    --to=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.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