Re: 5.8-rc*: kernel BUG at kernel/signal.c:1917

From: Oleg Nesterov
Date: Mon Jul 20 2020 - 02:44:17 EST


On 07/20, Jiri Slaby wrote:
>
> You tackled it, we cherry-picked dbfb089d360 to our kernels. Ccing more
> people.

Thanks... so with this patch __schedule() does

prev_state = prev->state;

...

if (!preempt && prev_state && prev_state == prev->state) {
if (signal_pending_state(prev_state, prev)) {
prev->state = TASK_RUNNING;
} else {

and ptrace_freeze_traced() can change ->state in between. This means
that this task can return from __schedule() with ->state != RUNNING,
this can explain BUG_ON(task_is_stopped_or_traced) in do_notify_parent()
you reported.

Oleg.