From: Tiezhu Yang Date: Sun, 23 Apr 2023 01:38:03 +0000 (+0800) Subject: MIPS: uprobes: Restore thread.trap_nr X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=46e614cc91f7bd6f7872e434e6bcfda44454aac3;p=linux.git MIPS: uprobes: Restore thread.trap_nr thread.trap_nr is saved in arch_uprobe_pre_xol(), it should be restored in arch_uprobe_{post,abort}_xol() accordingly, actually it was only done in the post function, just do it in the abort function too, this change is similar with x86 and powerpc. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer --- diff --git a/arch/mips/kernel/uprobes.c b/arch/mips/kernel/uprobes.c index 6b630ed4438d3..401b148f89179 100644 --- a/arch/mips/kernel/uprobes.c +++ b/arch/mips/kernel/uprobes.c @@ -191,6 +191,7 @@ void arch_uprobe_abort_xol(struct arch_uprobe *aup, { struct uprobe_task *utask = current->utask; + current->thread.trap_nr = utask->autask.saved_trap_nr; instruction_pointer_set(regs, utask->vaddr); }