On Thu 04-08-11 11:09:47, Bob Liu wrote: > Signed-off-by: Bob Liu <lliubbo@xxxxxxxxx> Reviewed-by: Michal Hocko <mhocko@xxxxxxx> > --- > mm/page_cgroup.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c > index 39d216d..6bdc67d 100644 > --- a/mm/page_cgroup.c > +++ b/mm/page_cgroup.c > @@ -513,11 +513,10 @@ int swap_cgroup_swapon(int type, unsigned long max_pages) > length = DIV_ROUND_UP(max_pages, SC_PER_PAGE); > array_size = length * sizeof(void *); > > - array = vmalloc(array_size); > + array = vzalloc(array_size); > if (!array) > goto nomem; > > - memset(array, 0, array_size); > ctrl = &swap_cgroup_ctrl[type]; > mutex_lock(&swap_cgroup_mutex); > ctrl->length = length; > -- > 1.6.3.3 > > -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>