Skip to content

Commit 5e3f0d1

Browse files
kvaneeshmpe
authored andcommitted
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: df78d3f ("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>
1 parent 39b91dd commit 5e3f0d1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎arch/powerpc/kernel/stacktrace.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,14 @@ save_stack_trace_tsk_reliable(struct task_struct *tsk,
168168
* arch-dependent code, they are generic.
169169
*/
170170
ip = ftrace_graph_ret_addr(tsk, &graph_idx, ip, NULL);
171-
171+
#ifdef CONFIG_KPROBES
172172
/*
173173
* Mark stacktraces with kretprobed functions on them
174174
* as unreliable.
175175
*/
176176
if (ip == (unsigned long)kretprobe_trampoline)
177177
return 1;
178+
#endif
178179

179180
if (!trace->skip)
180181
trace->entries[trace->nr_entries++] = ip;

0 commit comments

Comments
 (0)