Skip to content

Commit 2a2bcfa

Browse files
committed
arm/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 <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Alexander Potapenko <glider@google.com> Cc: Russell King <linux@armlinux.org.uk> Cc: linux-arm-kernel@lists.infradead.org Link: https://lkml.kernel.org/r/20190410103643.843075256@linutronix.de
1 parent c5c27a0 commit 2a2bcfa

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

‎arch/arm/kernel/stacktrace.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ static noinline void __save_stack_trace(struct task_struct *tsk,
115115
* running on another CPU? For now, ignore it as we
116116
* can't guarantee we won't explode.
117117
*/
118-
if (trace->nr_entries < trace->max_entries)
119-
trace->entries[trace->nr_entries++] = ULONG_MAX;
120118
return;
121119
#else
122120
frame.fp = thread_saved_fp(tsk);
@@ -134,8 +132,6 @@ static noinline void __save_stack_trace(struct task_struct *tsk,
134132
}
135133

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

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

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

160154
void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)

0 commit comments

Comments
 (0)