Skip to content

Commit 995b406

Browse files
committedJul 2, 2023
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
2 parents dfab92f + dd64621 commit 995b406

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎arch/csky/kernel/probes/uprobes.c

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
6464
struct uprobe_task *utask = current->utask;
6565

6666
WARN_ON_ONCE(current->thread.trap_no != UPROBE_TRAP_NR);
67+
current->thread.trap_no = utask->autask.saved_trap_no;
6768

6869
instruction_pointer_set(regs, utask->vaddr + auprobe->insn_size);
6970

@@ -101,6 +102,8 @@ void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
101102
{
102103
struct uprobe_task *utask = current->utask;
103104

105+
current->thread.trap_no = utask->autask.saved_trap_no;
106+
104107
/*
105108
* Task has received a fatal signal, so reset back to probed
106109
* address.

0 commit comments

Comments
 (0)
Please sign in to comment.