Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 019e579d authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Ingo Molnar
Browse files

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: default avatarJosh 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: default avatarIngo Molnar <mingo@kernel.org>
parent 1d723de7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
}