]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/stacktrace.h
8021q: fix a potential memory leak
[mirror_ubuntu-bionic-kernel.git] / include / linux / stacktrace.h
CommitLineData
8637c099
IM
1#ifndef __LINUX_STACKTRACE_H
2#define __LINUX_STACKTRACE_H
3
897312bd 4struct task_struct;
9c0729dc 5struct pt_regs;
897312bd 6
8637c099 7#ifdef CONFIG_STACKTRACE
b618ad31
VN
8struct task_struct;
9
8637c099
IM
10struct stack_trace {
11 unsigned int nr_entries, max_entries;
12 unsigned long *entries;
5a1b3999 13 int skip; /* input argument: How many entries to skip */
8637c099
IM
14};
15
ab1b6f03 16extern void save_stack_trace(struct stack_trace *trace);
39581062
MH
17extern void save_stack_trace_regs(struct pt_regs *regs,
18 struct stack_trace *trace);
9745512c
AV
19extern void save_stack_trace_tsk(struct task_struct *tsk,
20 struct stack_trace *trace);
8637c099
IM
21
22extern void print_stack_trace(struct stack_trace *trace, int spaces);
02b67518 23
8d26487f 24#ifdef CONFIG_USER_STACKTRACE_SUPPORT
02b67518
TE
25extern void save_stack_trace_user(struct stack_trace *trace);
26#else
27# define save_stack_trace_user(trace) do { } while (0)
28#endif
29
8637c099 30#else
ab1b6f03 31# define save_stack_trace(trace) do { } while (0)
9745512c 32# define save_stack_trace_tsk(tsk, trace) do { } while (0)
8d7c6a96 33# define save_stack_trace_user(trace) do { } while (0)
3b5ad079 34# define print_stack_trace(trace, spaces) do { } while (0)
8637c099
IM
35#endif
36
37#endif