Signed-off-by: Cesar Eduardo Barros <cesarb@xxxxxxxxxx> --- mm/swapfile.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 07a458d..69a1f90 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2047,13 +2047,12 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) goto bad_swap; /* OK, set up the swap map and apply the bad block list */ - swap_map = vmalloc(maxpages); + swap_map = vzalloc(maxpages); if (!swap_map) { error = -ENOMEM; goto bad_swap; } - memset(swap_map, 0, maxpages); nr_good_pages = maxpages - 1; /* omit header page */ for (i = 0; i < swap_header->info.nr_badpages; i++) { -- 1.7.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx 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>