blob: 7cd71e090e52ff2468dbc6cd3a506d5991700f60 [file] [log] [blame]
From 190267e1c8b3ba909057ef08a0e7decdf1be102d Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (VMware)" <>
Date: Thu, 2 Jan 2020 22:02:41 -0500
Subject: [PATCH] tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is
not defined
commit b8299d362d0837ae39e87e9019ebe6b736e0f035 upstream.
On some archs with some configurations, MCOUNT_INSN_SIZE is not defined, and
this makes the stack tracer fail to compile. Just define it to zero in this
Fixes: 4df297129f622 ("tracing: Remove most or all of stack tracer stack size from stack_max_size")
Reported-by: kbuild test robot <>
Signed-off-by: Steven Rostedt (VMware) <>
Signed-off-by: Paul Gortmaker <>
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index 5d16f73898db..568068782e11 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -170,6 +170,11 @@ static void check_stack(unsigned long ip, unsigned long *stack)
+/* Some archs may not define MCOUNT_INSN_SIZE */
+# define MCOUNT_INSN_SIZE 0
static void
stack_trace_call(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct pt_regs *pt_regs)