Commit c1bcd6b3 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Linus Torvalds

kmemleak: Use GFP_ATOMIC for early_alloc().

We can't use GFP_KERNEL inside rcu_read_lock().
Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 084d3200
...@@ -833,7 +833,7 @@ static void early_alloc(struct early_log *log) ...@@ -833,7 +833,7 @@ static void early_alloc(struct early_log *log)
*/ */
rcu_read_lock(); rcu_read_lock();
object = create_object((unsigned long)log->ptr, log->size, 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); spin_lock_irqsave(&object->lock, flags);
for (i = 0; i < log->trace_len; i++) for (i = 0; i < log->trace_len; i++)
object->trace[i] = log->trace[i]; object->trace[i] = log->trace[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment