[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190128184231.GS18811@dhcp22.suse.cz>
Date: Mon, 28 Jan 2019 19:42:31 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
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 Mon 28-01-19 10:15:13, Andrew Morton wrote:
> 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?
Yes, I would go with stable backport.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists