summaryrefslogtreecommitdiffstats
path: root/arch/csky
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-07-02 06:12:32 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2023-07-02 06:12:32 +0200
commit995b406c7e972fab181a4bb57f3b95e59b8e5bf3 (patch)
tree438258e6d7fadbb73120b1f6e53f11f641d6c2c9 /arch/csky
parentMerge tag 'nfs-for-6.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs (diff)
parentcsky: uprobes: Restore thread.trap_no (diff)
downloadlinux-995b406c7e972fab181a4bb57f3b95e59b8e5bf3.tar.xz
linux-995b406c7e972fab181a4bb57f3b95e59b8e5bf3.zip
Merge tag 'csky-for-linus-6.5' of https://github.com/c-sky/csky-linux
Pull arch/csky update from Guo Ren: - Correct thread.trap_no restore of uprobe * tag 'csky-for-linus-6.5' of https://github.com/c-sky/csky-linux: csky: uprobes: Restore thread.trap_no
Diffstat (limited to 'arch/csky')
-rw-r--r--arch/csky/kernel/probes/uprobes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/csky/kernel/probes/uprobes.c b/arch/csky/kernel/probes/uprobes.c
index 2d31a12e46cf..936bea6fd32d 100644
--- a/arch/csky/kernel/probes/uprobes.c
+++ b/arch/csky/kernel/probes/uprobes.c
@@ -64,6 +64,7 @@ int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
struct uprobe_task *utask = current->utask;
WARN_ON_ONCE(current->thread.trap_no != UPROBE_TRAP_NR);
+ current->thread.trap_no = utask->autask.saved_trap_no;
instruction_pointer_set(regs, utask->vaddr + auprobe->insn_size);
@@ -101,6 +102,8 @@ void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
{
struct uprobe_task *utask = current->utask;
+ current->thread.trap_no = utask->autask.saved_trap_no;
+
/*
* Task has received a fatal signal, so reset back to probed
* address.