Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: stacktrace: Add reliability checks in address saving ops.

This adopts the reliability checks from the x86 stacktrace code so known
bad addresses are not recorded in the stack trace buffer.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

+6
+6
arch/sh/kernel/stacktrace.c
··· 38 38 { 39 39 struct stack_trace *trace = data; 40 40 41 + if (!reliable) 42 + return; 43 + 41 44 if (trace->skip > 0) { 42 45 trace->skip--; 43 46 return; ··· 69 66 save_stack_address_nosched(void *data, unsigned long addr, int reliable) 70 67 { 71 68 struct stack_trace *trace = (struct stack_trace *)data; 69 + 70 + if (!reliable) 71 + return; 72 72 73 73 if (in_sched_functions(addr)) 74 74 return;