Skip to content
Snippets Groups Projects
Commit 8594698e authored by Ingo Molnar's avatar Ingo Molnar
Browse files

stacktrace: fix modular build, export print_stack_trace and save_stack_trace


fix:

ERROR: "print_stack_trace" [kernel/backtracetest.ko] undefined!
ERROR: "save_stack_trace" [kernel/backtracetest.ko] undefined!

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>

and fix:

  Building modules, stage 2.
  MODPOST 376 modules
ERROR: "print_stack_trace" [kernel/backtracetest.ko] undefined!
make[1]: *** [__modpost] Error 1

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 4e6a0535
Branches
Tags
No related merge requests found
...@@ -74,6 +74,7 @@ void save_stack_trace(struct stack_trace *trace) ...@@ -74,6 +74,7 @@ void save_stack_trace(struct stack_trace *trace)
if (trace->nr_entries < trace->max_entries) if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX; trace->entries[trace->nr_entries++] = ULONG_MAX;
} }
EXPORT_SYMBOL_GPL(save_stack_trace);
void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
{ {
...@@ -81,3 +82,4 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) ...@@ -81,3 +82,4 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
if (trace->nr_entries < trace->max_entries) if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX; trace->entries[trace->nr_entries++] = ULONG_MAX;
} }
EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
* Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
*/ */
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/module.h>
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/stacktrace.h> #include <linux/stacktrace.h>
...@@ -21,4 +22,5 @@ void print_stack_trace(struct stack_trace *trace, int spaces) ...@@ -21,4 +22,5 @@ void print_stack_trace(struct stack_trace *trace, int spaces)
print_ip_sym(trace->entries[i]); print_ip_sym(trace->entries[i]);
} }
} }
EXPORT_SYMBOL_GPL(print_stack_trace);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment