lkml.org 
[lkml]   [2016]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] mm: workingset: fix NULL ptr in count_shadow_nodes
On Fri, Dec 2, 2016 at 12:21 AM, Michal Hocko <mhocko@kernel.org> wrote:
> From: Michal Hocko <mhocko@suse.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:
>
<snip>
>
> - if (memcg_kmem_enabled()) {
> + if (sc->memcg) {
> pages = mem_cgroup_node_nr_lru_pages(sc->memcg, sc->nid,
> LRU_ALL_FILE);
> } else {

Acked-by: Balbir Singh <bsingharora@gmail.com>

\
 
 \ /
  Last update: 2016-12-01 22:24    [W:0.032 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site