OMAPDSS: VENC: fix NULL pointer dereference in DSS2 VENC sysfs debug attr on OMAP4
[zen-stable.git] / kernel / stacktrace.c
blob00fe55cc5a829a76b5b6faee8c2052b9f64e65b7
1 /*
2 * kernel/stacktrace.c
4 * Stack trace management functions
6 * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
7 */
8 #include <linux/sched.h>
9 #include <linux/kernel.h>
10 #include <linux/export.h>
11 #include <linux/kallsyms.h>
12 #include <linux/stacktrace.h>
14 void print_stack_trace(struct stack_trace *trace, int spaces)
16 int i;
18 if (WARN_ON(!trace->entries))
19 return;
21 for (i = 0; i < trace->nr_entries; i++) {
22 printk("%*c", 1 + spaces, ' ');
23 print_ip_sym(trace->entries[i]);
26 EXPORT_SYMBOL_GPL(print_stack_trace);
29 * Architectures that do not implement save_stack_trace_tsk or
30 * save_stack_trace_regs get this weak alias and a once-per-bootup warning
31 * (whenever this facility is utilized - for example by procfs):
33 __weak void
34 save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
36 WARN_ONCE(1, KERN_INFO "save_stack_trace_tsk() not implemented yet.\n");
39 __weak void
40 save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace)
42 WARN_ONCE(1, KERN_INFO "save_stack_trace_regs() not implemented yet.\n");