Re: [PATCH v2] exec: make de_thread() freezable

From: Oleg Nesterov
Date: Wed Nov 14 2018 - 09:37:14 EST


On 11/14, Michal Hocko wrote:
>
> > I don't understand why it isn't appropriate for exec to block. The
> > exec can freeze. When tasks are thawed, the killed sub-thread will die
> > and wake de_thread(). The exec will continue to work from resume.
>
> Because this is fragile.

I don't really agree, but...

> I haven't checked the full set of resources the
> task holds when in this path but I can imagine we can introduce lock
> dependency on freezing really easily.

And you are right, see another email I sent you a minute ago.

But again, we need to change de_thread to sleep without cred_guard_mutex
anyway, so I think this change is fine. At least in that it can't add the
new problems.

Oleg.