From: Johannes Weiner <hannes@cmpxchg.org> To: Michal Hocko <mhocko@kernel.org> Cc: "Andrew Morton" <akpm@linux-foundation.org>, "Vladimir Davydov" <vdavydov.dev@gmail.com>, "Marek Marczykowski-Górecki" <marmarek@mimuw.edu.pl>, "Balbir Singh" <bsingharora@gmail.com>, linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] mm: workingset: fix NULL ptr in count_shadow_nodes Date: Thu, 1 Dec 2016 16:07:15 -0500 [thread overview] Message-ID: <20161201210715.GA21302@cmpxchg.org> (raw) In-Reply-To: <20161201132156.21450-1-mhocko@kernel.org> On Thu, Dec 01, 2016 at 02:21:56PM +0100, Michal Hocko 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: [...] > 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@mimuw.edu.pl> > Cc: stable@vger.kernel.org # 4.6+ > Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Thanks Michal
WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org> To: Michal Hocko <mhocko@kernel.org> Cc: "Andrew Morton" <akpm@linux-foundation.org>, "Vladimir Davydov" <vdavydov.dev@gmail.com>, "Marek Marczykowski-Górecki" <marmarek@mimuw.edu.pl>, "Balbir Singh" <bsingharora@gmail.com>, linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] mm: workingset: fix NULL ptr in count_shadow_nodes Date: Thu, 1 Dec 2016 16:07:15 -0500 [thread overview] Message-ID: <20161201210715.GA21302@cmpxchg.org> (raw) In-Reply-To: <20161201132156.21450-1-mhocko@kernel.org> On Thu, Dec 01, 2016 at 02:21:56PM +0100, Michal Hocko 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: [...] > 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-Gorecki <marmarek@mimuw.edu.pl> > Cc: stable@vger.kernel.org # 4.6+ > Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Thanks Michal -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-12-01 21:07 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-12-01 13:21 [PATCH] mm: workingset: fix NULL ptr in count_shadow_nodes Michal Hocko 2016-12-01 13:21 ` Michal Hocko 2016-12-01 13:32 ` Vladimir Davydov 2016-12-01 13:32 ` Vladimir Davydov 2016-12-01 21:07 ` Johannes Weiner [this message] 2016-12-01 21:07 ` Johannes Weiner 2016-12-01 21:24 ` Balbir Singh 2016-12-01 21:24 ` Balbir Singh
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20161201210715.GA21302@cmpxchg.org \ --to=hannes@cmpxchg.org \ --cc=akpm@linux-foundation.org \ --cc=bsingharora@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=marmarek@mimuw.edu.pl \ --cc=mhocko@kernel.org \ --cc=vdavydov.dev@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.