aboutsummaryrefslogtreecommitdiffstats
path: root/net/packet
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-11-20 02:31:54 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-21 13:01:42 -0500
commitbbce5a59e4e0e6e1dbc85492caaf310ff6611309 (patch)
treeba64b369e60484e681e57ee63715b3d22cc7db16 /net/packet
parent9a2d09cf61c9d9f1b31998bec5363a583e4564a4 (diff)
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>
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/af_packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index b6372dd128d7..422705d62b5b 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -2367,7 +2367,7 @@ static inline char *alloc_one_pg_vec_page(unsigned long order,
2367 * __get_free_pages failed, fall back to vmalloc 2367 * __get_free_pages failed, fall back to vmalloc
2368 */ 2368 */
2369 *flags |= PGV_FROM_VMALLOC; 2369 *flags |= PGV_FROM_VMALLOC;
2370 buffer = vmalloc((1 << order) * PAGE_SIZE); 2370 buffer = vzalloc((1 << order) * PAGE_SIZE);
2371 2371
2372 if (buffer) 2372 if (buffer)
2373 return buffer; 2373 return buffer;