Re: [RFC PATCH] oom: Don't count on mm-less current process.

Michal Hocko
2014-12-23T12:27:39Z

On Tue 23-12-14 20:57:23, Tetsuo Handa wrote:
> Tetsuo Handa wrote:
> > If such a delay is theoretically impossible, I'm OK with your patch.
> >
>
> Oops, I forgot to mention that task_unlock(p) should be called before
> put_task_struct(p), in case p->usage == 1 at put_task_struct(p).

True. It would be quite surprising to see p->mm != NULL if the OOM
killer was the only one to hold a reference to the task. So it shouldn't
make any difference AFAICS. It is a good practice to change that though.
Fixed.

[...]

Thanks!
--
Michal Hocko
SUSE Labs