[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190128101513.f35752d6210f0781d0de8d17@linux-foundation.org>
Date: Mon, 28 Jan 2019 10:15:13 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc: Michal Hocko <mhocko@...nel.org>,
Arkadiusz MiĆkiewicz <a.miskiewicz@...il.com>,
Tejun Heo <tj@...nel.org>, cgroups@...r.kernel.org,
Aleksa Sarai <asarai@...e.de>, Jay Kamat <jgkamat@...com>,
Roman Gushchin <guro@...com>,
Johannes Weiner <hannes@...xchg.org>,
linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-mm <linux-mm@...ck.org>
Subject: Re: [PATCH v3] oom, oom_reaper: do not enqueue same task twice
On Sun, 27 Jan 2019 23:57:38 +0900 Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp> wrote:
> Arkadiusz reported that enabling memcg's group oom killing causes
> strange memcg statistics where there is no task in a memcg despite
> the number of tasks in that memcg is not 0. It turned out that there
> is a bug in wake_oom_reaper() which allows enqueuing same task twice
> which makes impossible to decrease the number of tasks in that memcg
> due to a refcount leak.
>
> This bug existed since the OOM reaper became invokable from
> task_will_free_mem(current) path in out_of_memory() in Linux 4.7,
> but memcg's group oom killing made it easier to trigger this bug by
> calling wake_oom_reaper() on the same task from one out_of_memory()
> request.
>
> Fix this bug using an approach used by commit 855b018325737f76
> ("oom, oom_reaper: disable oom_reaper for oom_kill_allocating_task").
> As a side effect of this patch, this patch also avoids enqueuing
> multiple threads sharing memory via task_will_free_mem(current) path.
>
Do we think this is serious enough to warrant a -stable backport?
Powered by blists - more mailing lists