[<prev] [next>] [day] [month] [year] [list]
Message-ID: <163489016535.626.9246162835594085125.tip-bot2@tip-bot2>
Date: Fri, 22 Oct 2021 08:09:25 -0000
From: "tip-bot2 for Ingo Molnar" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Qi Zheng <zhengqi.arch@...edance.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: sched/core] stacktrace: Provide stack_trace_save_tsk() stub in
the !CONFIG_STACKTRACE case too
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 037495eb8133281667b6dbc98912086825015286
Gitweb: https://git.kernel.org/tip/037495eb8133281667b6dbc98912086825015286
Author: Ingo Molnar <mingo@...nel.org>
AuthorDate: Fri, 22 Oct 2021 09:40:27 +02:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Fri, 22 Oct 2021 09:40:27 +02:00
stacktrace: Provide stack_trace_save_tsk() stub in the !CONFIG_STACKTRACE case too
The following commit:
bc9bbb81730e ("x86: Fix get_wchan() to support the ORC unwinder")
Added stack_trace_save_tsk() use to __get_wchan(), while this method is not
unconditionally defined: it's not available in the !CONFIG_STACKTRACE case.
Give a default implementation that does nothing.
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Fixes: bc9bbb81730e ("x86: Fix get_wchan() to support the ORC unwinder")
Cc: Qi Zheng <zhengqi.arch@...edance.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
include/linux/stacktrace.h | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h
index 9edecb4..3ccaf59 100644
--- a/include/linux/stacktrace.h
+++ b/include/linux/stacktrace.h
@@ -91,8 +91,19 @@ extern void save_stack_trace_tsk(struct task_struct *tsk,
extern int save_stack_trace_tsk_reliable(struct task_struct *tsk,
struct stack_trace *trace);
extern void save_stack_trace_user(struct stack_trace *trace);
+
#endif /* !CONFIG_ARCH_STACKWALK */
-#endif /* CONFIG_STACKTRACE */
+
+#else /* !CONFIG_STACKTRACE: */
+static inline unsigned int
+stack_trace_save_tsk(struct task_struct *task,
+ unsigned long *store, unsigned int size,
+ unsigned int skipnr)
+{
+ return -ENOSYS;
+}
+
+#endif /* !CONFIG_STACKTRACE */
#if defined(CONFIG_STACKTRACE) && defined(CONFIG_HAVE_RELIABLE_STACKTRACE)
int stack_trace_save_tsk_reliable(struct task_struct *tsk, unsigned long *store,
Powered by blists - more mailing lists