Re: [PATCH] mm: memcontrol: fix NULL-ptr deref in percpu stats flush

2019-10-18 Thread Roman Gushchin
On Fri, Oct 18, 2019 at 09:52:31AM -0700, Shakeel Butt wrote: > __mem_cgroup_free() can be called on the failure path in > mem_cgroup_alloc(). However memcg_flush_percpu_vmstats() and > memcg_flush_percpu_vmevents() which are called from __mem_cgroup_free() > access the fields of memcg which can

[PATCH] mm: memcontrol: fix NULL-ptr deref in percpu stats flush

2019-10-18 Thread Shakeel Butt
__mem_cgroup_free() can be called on the failure path in mem_cgroup_alloc(). However memcg_flush_percpu_vmstats() and memcg_flush_percpu_vmevents() which are called from __mem_cgroup_free() access the fields of memcg which can potentially be null if called from failure path from