Message ID | d263c463-f2e3-7f2c-3eac-20297bcd9341@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: don't dump stack for usermode address in show_regs | expand |
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 7f1628e..454825a 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -249,7 +249,9 @@ void __show_regs(struct pt_regs *regs) void show_regs(struct pt_regs * regs) { __show_regs(regs); - dump_backtrace(regs, NULL); + + if (!user_mode(regs)) + dump_backtrace(regs, NULL); } static void tls_thread_flush(void)
The patch 1149aad10b ("arm64: Add dump_backtrace() in show_regs") would help to dump the stack when debug in the socklockups, but if the issues happened in the user space, it will be errors when dumping the usermode address in kernel, so don't dump stack for usermode address in show_regs. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> --- arch/arm64/kernel/process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)