Message ID | 20210224165037.24138-1-broonie@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RESEND] arm64: stacktrace: Report when we reach the end of the stack | expand |
On Wed, 24 Feb 2021 16:50:37 +0000, Mark Brown wrote: > Currently the arm64 unwinder code returns -EINVAL whenever it can't find > the next stack frame, not distinguishing between cases where the stack has > been corrupted or is otherwise in a state it shouldn't be and cases > where we have reached the end of the stack. At the minute none of the > callers care what error code is returned but this will be important for > reliable stack trace which needs to be sure that the stack is intact. > > [...] Applied to arm64 (for-next/fixes), thanks! [1/1] arm64: stacktrace: Report when we reach the end of the stack https://git.kernel.org/arm64/c/3c02600144bd Cheers,
diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c index 0fb42129b469..ad20981dfda4 100644 --- a/arch/arm64/kernel/stacktrace.c +++ b/arch/arm64/kernel/stacktrace.c @@ -46,7 +46,7 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame) /* Terminal record; nothing to unwind */ if (!fp) - return -EINVAL; + return -ENOENT; if (fp & 0xf) return -EINVAL;