Skip to content

Commit

Permalink
arm/stacktrace: Remove the pointless ULONG_MAX marker
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
KAGA-KOKO committed Apr 14, 2019
1 parent c5c27a0 commit 2a2bcfa
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions arch/arm/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ static noinline void __save_stack_trace(struct task_struct *tsk,
* running on another CPU? For now, ignore it as we
* can't guarantee we won't explode.
*/
if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX;
return;
#else
frame.fp = thread_saved_fp(tsk);
Expand All @@ -134,8 +132,6 @@ static noinline void __save_stack_trace(struct task_struct *tsk,
}

walk_stackframe(&frame, save_trace, &data);
if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX;
}

void save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace)
Expand All @@ -153,8 +149,6 @@ void save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace)
frame.pc = regs->ARM_pc;

walk_stackframe(&frame, save_trace, &data);
if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX;
}

void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
Expand Down

0 comments on commit 2a2bcfa

Please sign in to comment.