Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

packet: use vzalloc()

alloc_one_pg_vec_page() is supposed to return zeroed memory, so use
vzalloc() instead of vmalloc()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
bbce5a59 9a2d09cf

+1 -1
+1 -1
net/packet/af_packet.c
··· 2367 2367 * __get_free_pages failed, fall back to vmalloc 2368 2368 */ 2369 2369 *flags |= PGV_FROM_VMALLOC; 2370 - buffer = vmalloc((1 << order) * PAGE_SIZE); 2370 + buffer = vzalloc((1 << order) * PAGE_SIZE); 2371 2371 2372 2372 if (buffer) 2373 2373 return buffer;