diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2016-08-24 11:50:14 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-08 08:58:40 +0200 |
commit | 019e579d395733d14097c2d29c8c43226dad1617 (patch) | |
tree | 9f8183696df0afc107577b49c9d52a9fb8fa2a08 /arch/x86/events/core.c | |
parent | 1d723de7396c1c028a091a37b2211ff6892c7f52 (diff) | |
download | linux-019e579d395733d14097c2d29c8c43226dad1617.tar.gz linux-019e579d395733d14097c2d29c8c43226dad1617.tar.bz2 linux-019e579d395733d14097c2d29c8c43226dad1617.zip |
perf/x86: Check perf_callchain_store() error
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>
Diffstat (limited to 'arch/x86/events/core.c')
-rw-r--r-- | arch/x86/events/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index d0efb5cb1b00..c1319ac19ebb 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -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); } |