Re: [RFC PATCH] mm, oom: fix use-after-free in oom_kill_process

From: Michal Hocko
Date: Mon Jan 21 2019 - 04:19:31 EST


On Sat 19-01-19 08:09:34, Michal Hocko wrote:
[...]
> Fixes: 5e9d834a0e0c ("oom: sacrifice child with highest badness score for parent")

So I've double checked and I was wrong blaming this commit. Back then it
was tasklist_lock to protect us from releasing the task. It's been only
since 6b0c81b3be11 ("mm, oom: reduce dependency on tasklist_lock") that
we rely on the reference counting and unless I am missing something this
is also the commit which has introduced this bug.

> Cc: stable

--
Michal Hocko
SUSE Labs