Re: [RFC][PATCH 3/7] exit: Desl with nested sleeps

From: Oleg Nesterov
Date: Mon Aug 04 2014 - 14:56:04 EST


On 08/04, Peter Zijlstra wrote:
>
> Not strictly a bug in the current form,

Yes, this is the false positive.

> but clean it up to enable
> debugging infrastructure and avoid it becoming a bug.

OK, but

> @@ -991,6 +991,8 @@ static int wait_task_zombie(struct wait_
>
> get_task_struct(p);
> read_unlock(&tasklist_lock);
> + __set_current_state(TASK_RUNNING);
> +

without a comment it is not clear why do we bother to set RUNNING here.

Perhaps we can add another helper which sets current->state = RUNNING?
Just to self-document the usage.

We can even make it depend on CONFIG_DEBUG_ATOMIC_SLEEP (not sure this
makes sense). But in this case it should set ->task_state_change = 0
and __might_sleep() should take !task_state_change into account.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/