lkml.org 
[lkml]   [2012]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] debugobjects: Use GFP_ATOMIC to allocate when initializing
Date
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


\
 
 \ /
  Last update: 2012-03-31 21:25    [W:0.086 / U:4.996 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site