Re: [PATCH] ptrace: fix ptrace_unfreeze_traced() race with rt-lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, I don't understand. If it was not clear, let me repeat that I know
nothing about kernel-rt.

On 11/02, Sebastian Andrzej Siewior wrote:
> On 2020-11-02 18:01:33 [+0100], Oleg Nesterov wrote:
>
> > So it seems I should send V2 which uses raw_spin_(un)lock_irq().
> >
> > Or even _irqsave() like ptrace_freeze_traced() does? Although this looks
> > confusing, exactly because ptrace_freeze_traced() calls task_is_traced()
> > which does raw_spin_lock_irq().
>
> Urgh. Judging from
>  release_task()
>  -> write_lock_irq(&tasklist_lock);
>  -> ptrace_release_task();
>     -> ptrace_unlink();
>        -> __ptrace_unlink();
>          -> task_is_traced().
>
> it will break on !RT so irqsave is indeed needed.

Why?

task_is_traced() does raw_spin_lock_irq() under ifdef(CONFIG_PREEMPT_RT).

Oleg.




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux