git » linux-kernel » commit c1bcd6b

kmemleak: Use GFP_ATOMIC for early_alloc().

author Tetsuo Handa
2009-10-09 09:39:24 UTC
committer Linus Torvalds
2009-10-09 20:28:47 UTC
parent 084d3200d523fc24d95e97797b6cdf1256bf0d1b

kmemleak: Use GFP_ATOMIC for early_alloc().

We can't use GFP_KERNEL inside rcu_read_lock().

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

mm/kmemleak.c +1 -1

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 4ea4510e299..a6175180d18 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -833,7 +833,7 @@ static void early_alloc(struct early_log *log)
 	 */
 	rcu_read_lock();
 	object = create_object((unsigned long)log->ptr, log->size,
-			       log->min_count, GFP_KERNEL);
+			       log->min_count, GFP_ATOMIC);
 	spin_lock_irqsave(&object->lock, flags);
 	for (i = 0; i < log->trace_len; i++)
 		object->trace[i] = log->trace[i];