summaryrefslogtreecommitdiff
path: root/arch/loongarch/kernel/unwind.c
diff options
context:
space:
mode:
authorJinyang He <hejinyang@loongson.cn>2023-12-09 10:49:15 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2023-12-09 10:49:15 +0300
commit97ceddbc9404a7d1e2c4049435bff29427d762cc (patch)
tree2196487277e4b35e6b16753514b69e0d74c0be80 /arch/loongarch/kernel/unwind.c
parent8146c5b349074da7732f1d45eb4a5f9fd192c7c1 (diff)
downloadlinux-97ceddbc9404a7d1e2c4049435bff29427d762cc.tar.xz
LoongArch: Set unwind stack type to unknown rather than set error flag
During unwinding, unwind_done() is used as an end condition. Normally it unwind to the user stack and then set the stack type to unknown, which is a normal exit. When something unexpected happens in unwind process and we cannot unwind anymore, we should set the error flag, and also set the stack type to unknown to indicate that the unwind process can not continue. The error flag emphasizes that the unwind process produce an unexpected error. There is no unexpected things when we unwind the PT_REGS in the top of IRQ stack and find out that is an user mode PT_REGS. Thus, we should not set error flag and just set stack type to unknown. Reported-by: Hengqi Chen <hengqi.chen@gmail.com> Acked-by: Hengqi Chen <hengqi.chen@gmail.com> Signed-off-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/unwind.c')
-rw-r--r--arch/loongarch/kernel/unwind.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/loongarch/kernel/unwind.c b/arch/loongarch/kernel/unwind.c
index ba324ba76fa1..a463d6961344 100644
--- a/arch/loongarch/kernel/unwind.c
+++ b/arch/loongarch/kernel/unwind.c
@@ -28,6 +28,5 @@ bool default_next_frame(struct unwind_state *state)
} while (!get_stack_info(state->sp, state->task, info));
- state->error = true;
return false;
}