Re: [PATCH] mm/memcontrol: fix NULL pointer dereference when use_hierarchy is 0

2015-02-24 Thread Joonsoo Kim
On Tue, Feb 17, 2015 at 09:33:27AM +0100, Michal Hocko wrote: > On Tue 17-02-15 14:24:59, Joonsoo Kim wrote: > > It can be possible to return NULL in parent_mem_cgroup() > > if use_hierarchy is 0. > > This alone is not sufficient because the low limit is present only in > the unified hierarchy

Re: [PATCH] mm/memcontrol: fix NULL pointer dereference when use_hierarchy is 0

2015-02-24 Thread Joonsoo Kim
On Tue, Feb 17, 2015 at 09:33:27AM +0100, Michal Hocko wrote: On Tue 17-02-15 14:24:59, Joonsoo Kim wrote: It can be possible to return NULL in parent_mem_cgroup() if use_hierarchy is 0. This alone is not sufficient because the low limit is present only in the unified hierarchy API and

Re: [PATCH] mm/memcontrol: fix NULL pointer dereference when use_hierarchy is 0

2015-02-17 Thread Johannes Weiner
On Tue, Feb 17, 2015 at 09:33:27AM +0100, Michal Hocko wrote: > On Tue 17-02-15 14:24:59, Joonsoo Kim wrote: > > It can be possible to return NULL in parent_mem_cgroup() > > if use_hierarchy is 0. > > This alone is not sufficient because the low limit is present only in > the unified hierarchy

Re: [PATCH] mm/memcontrol: fix NULL pointer dereference when use_hierarchy is 0

2015-02-17 Thread Michal Hocko
On Tue 17-02-15 14:24:59, Joonsoo Kim wrote: > It can be possible to return NULL in parent_mem_cgroup() > if use_hierarchy is 0. This alone is not sufficient because the low limit is present only in the unified hierarchy API and there is no use_hierarchy there. The primary issue here is that the

Re: [PATCH] mm/memcontrol: fix NULL pointer dereference when use_hierarchy is 0

2015-02-17 Thread Michal Hocko
On Tue 17-02-15 14:24:59, Joonsoo Kim wrote: It can be possible to return NULL in parent_mem_cgroup() if use_hierarchy is 0. This alone is not sufficient because the low limit is present only in the unified hierarchy API and there is no use_hierarchy there. The primary issue here is that the

Re: [PATCH] mm/memcontrol: fix NULL pointer dereference when use_hierarchy is 0

2015-02-17 Thread Johannes Weiner
On Tue, Feb 17, 2015 at 09:33:27AM +0100, Michal Hocko wrote: On Tue 17-02-15 14:24:59, Joonsoo Kim wrote: It can be possible to return NULL in parent_mem_cgroup() if use_hierarchy is 0. This alone is not sufficient because the low limit is present only in the unified hierarchy API and

[PATCH] mm/memcontrol: fix NULL pointer dereference when use_hierarchy is 0

2015-02-16 Thread Joonsoo Kim
It can be possible to return NULL in parent_mem_cgroup() if use_hierarchy is 0. So, we need to check NULL in the loop on mem_cgroup_low(). Without it, following NULL pointer dereference happens. [ 33.607531] BUG: unable to handle kernel NULL pointer dereference at 00b0 [

[PATCH] mm/memcontrol: fix NULL pointer dereference when use_hierarchy is 0

2015-02-16 Thread Joonsoo Kim
It can be possible to return NULL in parent_mem_cgroup() if use_hierarchy is 0. So, we need to check NULL in the loop on mem_cgroup_low(). Without it, following NULL pointer dereference happens. [ 33.607531] BUG: unable to handle kernel NULL pointer dereference at 00b0 [