Re: [PATCH] uprobes: Remove redundant spinlock in uprobe_deny_signal
From: Google
Date: Mon Oct 21 2024 - 23:45:10 EST
On Tue, 22 Oct 2024 11:22:22 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:
> On Wed, 31 Jul 2024 16:12:32 +0200
> Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> > On 07/31, Liao Chang wrote:
> > >
> > > --- a/kernel/events/uprobes.c
> > > +++ b/kernel/events/uprobes.c
> > > @@ -1979,9 +1979,7 @@ bool uprobe_deny_signal(void)
> > > WARN_ON_ONCE(utask->state != UTASK_SSTEP);
> > >
> > > if (task_sigpending(t)) {
> > > - spin_lock_irq(&t->sighand->siglock);
> > > clear_tsk_thread_flag(t, TIF_SIGPENDING);
> > > - spin_unlock_irq(&t->sighand->siglock);
> >
> > Agreed, in this case ->siglock buys nothing, another signal can come
> > right after spin_unlock().
> >
> > Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>
> >
> >
>
> Looks good to me.
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> Peter, can you pick this?
Oops, there is v3.
https://lore.kernel.org/linux-trace-kernel/20240815014629.2685155-2-liaochang1@xxxxxxxxxx/
>
> Thanks,
>
> --
> Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>