From: Thomas Gleixner Date: Wed, 10 Apr 2019 10:28:00 +0000 (+0200) Subject: riscv/stacktrace: Remove the pointless ULONG_MAX marker X-Git-Tag: Ubuntu-5.2.0-15.16~2077^2~39 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=fa9833992d5ff3c0d6e81d708bec363bce2fb54c;p=mirror_ubuntu-eoan-kernel.git riscv/stacktrace: Remove the pointless ULONG_MAX marker Terminating the last trace entry with ULONG_MAX is a completely pointless exercise and none of the consumers can rely on it because it's inconsistently implemented across architectures. In fact quite some of the callers remove the entry and adjust stack_trace.nr_entries afterwards. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Cc: Andy Lutomirski Cc: Steven Rostedt Cc: Alexander Potapenko Cc: linux-riscv@lists.infradead.org Cc: Palmer Dabbelt Cc: Albert Ou Link: https://lkml.kernel.org/r/20190410103644.131061192@linutronix.de --- diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c index a4b1d94371a0..4d403274c2e8 100644 --- a/arch/riscv/kernel/stacktrace.c +++ b/arch/riscv/kernel/stacktrace.c @@ -169,8 +169,6 @@ static bool save_trace(unsigned long pc, void *arg) void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) { walk_stackframe(tsk, NULL, save_trace, trace); - if (trace->nr_entries < trace->max_entries) - trace->entries[trace->nr_entries++] = ULONG_MAX; } EXPORT_SYMBOL_GPL(save_stack_trace_tsk);