Skip to content

Commit 380178e

Browse files
mirabpmladek
authored andcommitted
stacktrace: Remove weak version of save_stack_trace_tsk_reliable()
Recent rework of stack trace infrastructure introduced a new set of helpers for common stack trace operations (commit e9b98e1 ("stacktrace: Provide helpers for common stack trace operations") and related). As a result, save_stack_trace_tsk_reliable() is not directly called anywhere. Livepatch, currently the only user of the reliable stack trace feature, now calls stack_trace_save_tsk_reliable(). When CONFIG_HAVE_RELIABLE_STACKTRACE is set and depending on CONFIG_ARCH_STACKWALK, stack_trace_save_tsk_reliable() calls either arch_stack_walk_reliable() or mentioned save_stack_trace_tsk_reliable(). x86_64 defines the former, ppc64le the latter. All other architectures do not have HAVE_RELIABLE_STACKTRACE and include/linux/stacktrace.h defines -ENOSYS returning version for them. In short, stack_trace_save_tsk_reliable() returning -ENOSYS defined in include/linux/stacktrace.h serves the same purpose as the old weak version of save_stack_trace_tsk_reliable() which is therefore no longer needed. Signed-off-by: Miroslav Benes <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Reviewed-by: Kamalesh Babulal <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
1 parent f36e664 commit 380178e

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

kernel/stacktrace.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,6 @@ save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace)
254254
WARN_ONCE(1, KERN_INFO "save_stack_trace_regs() not implemented yet.\n");
255255
}
256256

257-
__weak int
258-
save_stack_trace_tsk_reliable(struct task_struct *tsk,
259-
struct stack_trace *trace)
260-
{
261-
WARN_ONCE(1, KERN_INFO "save_stack_tsk_reliable() not implemented yet.\n");
262-
return -ENOSYS;
263-
}
264-
265257
/**
266258
* stack_trace_save - Save a stack trace into a storage array
267259
* @store: Pointer to storage array

0 commit comments

Comments
 (0)