Selaa lähdekoodia

powerpc/livepatch: Fix build error with kprobes disabled.

arch/powerpc/kernel/stacktrace.c: In function ‘save_stack_trace_tsk_reliable’:
arch/powerpc/kernel/stacktrace.c:176:28: error: ‘kretprobe_trampoline’ undeclared
   if (ip == (unsigned long)kretprobe_trampoline)
                            ^~~~~~~~~~~~~~~~~~~~

Fixes: df78d3f61480 ("powerpc/livepatch: Implement reliable stack tracing for the consistency model")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Aneesh Kumar K.V 7 vuotta sitten
vanhempi
commit
5e3f0d15ae
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      arch/powerpc/kernel/stacktrace.c

+ 2 - 1
arch/powerpc/kernel/stacktrace.c

@@ -168,13 +168,14 @@ save_stack_trace_tsk_reliable(struct task_struct *tsk,
 		 * arch-dependent code, they are generic.
 		 * arch-dependent code, they are generic.
 		 */
 		 */
 		ip = ftrace_graph_ret_addr(tsk, &graph_idx, ip, NULL);
 		ip = ftrace_graph_ret_addr(tsk, &graph_idx, ip, NULL);
-
+#ifdef CONFIG_KPROBES
 		/*
 		/*
 		 * Mark stacktraces with kretprobed functions on them
 		 * Mark stacktraces with kretprobed functions on them
 		 * as unreliable.
 		 * as unreliable.
 		 */
 		 */
 		if (ip == (unsigned long)kretprobe_trampoline)
 		if (ip == (unsigned long)kretprobe_trampoline)
 			return 1;
 			return 1;
+#endif
 
 
 		if (!trace->skip)
 		if (!trace->skip)
 			trace->entries[trace->nr_entries++] = ip;
 			trace->entries[trace->nr_entries++] = ip;