* [tip: sched/core] stacktrace: Provide stack_trace_save_tsk() stub in the !CONFIG_STACKTRACE case too
@ 2021-10-22 8:09 tip-bot2 for Ingo Molnar
0 siblings, 0 replies; only message in thread
From: tip-bot2 for Ingo Molnar @ 2021-10-22 8:09 UTC (permalink / raw)
To: linux-tip-commits
Cc: Stephen Rothwell, Qi Zheng, Peter Zijlstra, Ingo Molnar, x86,
linux-kernel
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@kernel.org>
AuthorDate: Fri, 22 Oct 2021 09:40:27 +02:00
Committer: Ingo Molnar <mingo@kernel.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@canb.auug.org.au>
Fixes: bc9bbb81730e ("x86: Fix get_wchan() to support the ORC unwinder")
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.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,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-22 8:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 8:09 [tip: sched/core] stacktrace: Provide stack_trace_save_tsk() stub in the !CONFIG_STACKTRACE case too tip-bot2 for Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®