Skip to content

Commit 9212ddb

Browse files
author
Ingo Molnar
committed
stacktrace: provide save_stack_trace_tsk() weak alias
Impact: build fix Some architectures have not implemented save_stack_trace_tsk() yet: fs/built-in.o: In function `proc_pid_stack': base.c:(.text+0x3f140): undefined reference to `save_stack_trace_tsk' So warn about that if the facility is used. Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent 4a6908a commit 9212ddb

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎kernel/stacktrace.c‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
77
*/
88
#include <linux/sched.h>
9+
#include <linux/kernel.h>
910
#include <linux/module.h>
1011
#include <linux/kallsyms.h>
1112
#include <linux/stacktrace.h>
@@ -24,3 +25,13 @@ void print_stack_trace(struct stack_trace *trace, int spaces)
2425
}
2526
EXPORT_SYMBOL_GPL(print_stack_trace);
2627

28+
/*
29+
* Architectures that do not implement save_stack_trace_tsk get this
30+
* weak alias and a once-per-bootup warning (whenever this facility
31+
* is utilized - for example by procfs):
32+
*/
33+
__weak void
34+
save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
35+
{
36+
WARN_ONCE(1, KERN_INFO "save_stack_trace_tsk() not implemented yet.\n");
37+
}

0 commit comments

Comments
 (0)