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. And yes, using task_is_traced() and then acquired the PI lock again looks like too much. Either complain or send a patch, I will look tomorrow. > Oleg. Sebastian