[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161201210715.GA21302@cmpxchg.org>
Date: Thu, 1 Dec 2016 16:07:15 -0500
From: Johannes Weiner <hannes@...xchg.org>
To: Michal Hocko <mhocko@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Vladimir Davydov <vdavydov.dev@...il.com>,
Marek Marczykowski-Górecki
<marmarek@...uw.edu.pl>, Balbir Singh <bsingharora@...il.com>,
linux-mm@...ck.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: workingset: fix NULL ptr in count_shadow_nodes
On Thu, Dec 01, 2016 at 02:21:56PM +0100, Michal Hocko wrote:
> From: Michal Hocko <mhocko@...e.com>
>
> 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware")
> has made the workingset shadow nodes shrinker memcg aware. The
> implementation is not correct though because memcg_kmem_enabled() might
> become true while we are doing a global reclaim when the sc->memcg might
> be NULL which is exactly what Marek has seen:
[...]
> This patch fixes the issue by checking sc->memcg rather than memcg_kmem_enabled()
> which is sufficient because shrink_slab makes sure that only memcg aware shrinkers
> will get non-NULL memcgs and only if memcg_kmem_enabled is true.
>
> Fixes: 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware")
> Reported-and-tested-by: Marek Marczykowski-Górecki <marmarek@...uw.edu.pl>
> Cc: stable@...r.kernel.org # 4.6+
> Signed-off-by: Michal Hocko <mhocko@...e.com>
Acked-by: Johannes Weiner <hannes@...xchg.org>
Thanks Michal
Powered by blists - more mailing lists