Skip to content

Commit

Permalink
packet: use vzalloc()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 21, 2010
1 parent 9a2d09c commit bbce5a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -2367,7 +2367,7 @@ static inline char *alloc_one_pg_vec_page(unsigned long order,
* __get_free_pages failed, fall back to vmalloc
*/
*flags |= PGV_FROM_VMALLOC;
buffer = vmalloc((1 << order) * PAGE_SIZE);
buffer = vzalloc((1 << order) * PAGE_SIZE);

if (buffer)
return buffer;
Expand Down

0 comments on commit bbce5a5

Please sign in to comment.