public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] debugobjects: Use GFP_ATOMIC to allocate when initializing
@ 2012-03-31 21:22 Sasha Levin
  2012-04-01  2:17 ` Yong Zhang
  2012-04-01 17:36 ` Thomas Gleixner
  0 siblings, 2 replies; 8+ messages in thread
From: Sasha Levin @ 2012-03-31 21:22 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, Sasha Levin

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-04-02 19:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-31 21:22 [PATCH] debugobjects: Use GFP_ATOMIC to allocate when initializing Sasha Levin
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox