[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230424152815.GA32615@redhat.com>
Date: Mon, 24 Apr 2023 17:28:15 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Guo Ren <guoren@...nel.org>, linux-csky@...r.kernel.org,
linux-kernel@...r.kernel.org, loongson-kernel@...ts.loongnix.cn,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Subject: Re: [PATCH] csky: uprobes: Restore thread.trap_no
On 04/24, Tiezhu Yang wrote:
>
> >--- 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,7 @@ 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.
Acked-by: Oleg Nesterov <oleg@...hat.com>
Powered by blists - more mailing lists