[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170906123345.GA12904@castle>
Date: Wed, 6 Sep 2017 13:33:45 +0100
From: Roman Gushchin <guro@...com>
To: Michal Hocko <mhocko@...nel.org>
CC: <linux-mm@...ck.org>, Vladimir Davydov <vdavydov.dev@...il.com>,
Johannes Weiner <hannes@...xchg.org>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
David Rientjes <rientjes@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>, <kernel-team@...com>,
<cgroups@...r.kernel.org>, <linux-doc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [v7 2/5] mm, oom: cgroup-aware OOM killer
On Wed, Sep 06, 2017 at 10:34:13AM +0200, Michal Hocko wrote:
> On Tue 05-09-17 21:23:57, Roman Gushchin wrote:
> > On Tue, Sep 05, 2017 at 04:57:00PM +0200, Michal Hocko wrote:
> [...]
> > > > @@ -810,6 +810,9 @@ static void __oom_kill_process(struct task_struct *victim)
> > > > struct mm_struct *mm;
> > > > bool can_oom_reap = true;
> > > >
> > > > + if (is_global_init(victim) || (victim->flags & PF_KTHREAD))
> > > > + return;
> > > > +
> > >
> > > This will leak a reference to the victim AFACS
> >
> > Good catch!
> > I didn't fix this after moving reference dropping into __oom_kill_process().
> > Fixed.
>
> Btw. didn't you want to check
> victim->signal->oom_score_adj == OOM_SCORE_ADJ_MIN
>
> here as well? Maybe I've missed something but you still can kill a task
> which is oom disabled which I thought we agreed is the wrong thing to
> do.
Added. Thanks!
Powered by blists - more mailing lists