Re: [PATCH] mm/memcontrol.c: add memory allocation result check

2016-05-30 Thread Michal Hocko
On Mon 30-05-16 17:28:40, Wenwei Tao wrote: > I think explicit BUG_ON may make the debug easier, since it can point > out the wrong line. Does it? NULL ptr dereferencec 6 lines below sounds pretty close to me. I am not nacking this patch I just think it doesn't add much. If others think it will

Re: [PATCH] mm/memcontrol.c: add memory allocation result check

2016-05-30 Thread Michal Hocko
On Mon 30-05-16 17:28:40, Wenwei Tao wrote: > I think explicit BUG_ON may make the debug easier, since it can point > out the wrong line. Does it? NULL ptr dereferencec 6 lines below sounds pretty close to me. I am not nacking this patch I just think it doesn't add much. If others think it will

Re: [PATCH] mm/memcontrol.c: add memory allocation result check

2016-05-30 Thread Wenwei Tao
I think explicit BUG_ON may make the debug easier, since it can point out the wrong line. 2016-05-30 16:53 GMT+08:00 Michal Hocko : > On Mon 30-05-16 16:45:51, Wenwei Tao wrote: >> From: Wenwei Tao >> >> The mem_cgroup_tree_per_node allocation might fail,

Re: [PATCH] mm/memcontrol.c: add memory allocation result check

2016-05-30 Thread Wenwei Tao
I think explicit BUG_ON may make the debug easier, since it can point out the wrong line. 2016-05-30 16:53 GMT+08:00 Michal Hocko : > On Mon 30-05-16 16:45:51, Wenwei Tao wrote: >> From: Wenwei Tao >> >> The mem_cgroup_tree_per_node allocation might fail, >> check that before continue the memcg

Re: [PATCH] mm/memcontrol.c: add memory allocation result check

2016-05-30 Thread Michal Hocko
On Mon 30-05-16 16:45:51, Wenwei Tao wrote: > From: Wenwei Tao > > The mem_cgroup_tree_per_node allocation might fail, > check that before continue the memcg init. Since it > is in the init phase, trigger the panic if that failure > happens. We would blow up in the very

Re: [PATCH] mm/memcontrol.c: add memory allocation result check

2016-05-30 Thread Michal Hocko
On Mon 30-05-16 16:45:51, Wenwei Tao wrote: > From: Wenwei Tao > > The mem_cgroup_tree_per_node allocation might fail, > check that before continue the memcg init. Since it > is in the init phase, trigger the panic if that failure > happens. We would blow up in the very same function so what is

[PATCH] mm/memcontrol.c: add memory allocation result check

2016-05-30 Thread Wenwei Tao
From: Wenwei Tao The mem_cgroup_tree_per_node allocation might fail, check that before continue the memcg init. Since it is in the init phase, trigger the panic if that failure happens. Signed-off-by: Wenwei Tao --- mm/memcontrol.c | 1 + 1 file

[PATCH] mm/memcontrol.c: add memory allocation result check

2016-05-30 Thread Wenwei Tao
From: Wenwei Tao The mem_cgroup_tree_per_node allocation might fail, check that before continue the memcg init. Since it is in the init phase, trigger the panic if that failure happens. Signed-off-by: Wenwei Tao --- mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+) diff --git