]> git.karo-electronics.de Git - linux-beck.git/commitdiff
perf/x86: Check perf_callchain_store() error
authorJosh Poimboeuf <jpoimboe@redhat.com>
Wed, 24 Aug 2016 16:50:14 +0000 (11:50 -0500)
committerIngo Molnar <mingo@kernel.org>
Thu, 8 Sep 2016 06:58:40 +0000 (08:58 +0200)
Add a check to perf_callchain_kernel() so that it returns early if the
callchain entry array is already full.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Byungchul Park <byungchul.park@lge.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nilay Vaish <nilayvaish@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/dce6d60bab08be2600efd90021d9b85620646161.1472057064.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/core.c

index d0efb5cb1b00ece9656805cc62124454d00cda2d..c1319ac19ebb901577cdb1b122d41ac5bdbd168c 100644 (file)
@@ -2277,7 +2277,8 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
                return;
        }
 
-       perf_callchain_store(entry, regs->ip);
+       if (perf_callchain_store(entry, regs->ip))
+               return;
 
        dump_trace(NULL, regs, NULL, 0, &backtrace_ops, entry);
 }