diff options
Diffstat (limited to 'mm/kmemleak.c')
-rw-r--r-- | mm/kmemleak.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 4ea4510e2996..8bf765c4f58d 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c | |||
@@ -833,12 +833,15 @@ static void early_alloc(struct early_log *log) | |||
833 | */ | 833 | */ |
834 | rcu_read_lock(); | 834 | rcu_read_lock(); |
835 | object = create_object((unsigned long)log->ptr, log->size, | 835 | object = create_object((unsigned long)log->ptr, log->size, |
836 | log->min_count, GFP_KERNEL); | 836 | log->min_count, GFP_ATOMIC); |
837 | if (!object) | ||
838 | goto out; | ||
837 | spin_lock_irqsave(&object->lock, flags); | 839 | spin_lock_irqsave(&object->lock, flags); |
838 | for (i = 0; i < log->trace_len; i++) | 840 | for (i = 0; i < log->trace_len; i++) |
839 | object->trace[i] = log->trace[i]; | 841 | object->trace[i] = log->trace[i]; |
840 | object->trace_len = log->trace_len; | 842 | object->trace_len = log->trace_len; |
841 | spin_unlock_irqrestore(&object->lock, flags); | 843 | spin_unlock_irqrestore(&object->lock, flags); |
844 | out: | ||
842 | rcu_read_unlock(); | 845 | rcu_read_unlock(); |
843 | } | 846 | } |
844 | 847 | ||