Skip to content

Commit bbce5a5

Browse files
Eric Dumazetdavem330
authored andcommitted
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>
1 parent 9a2d09c commit bbce5a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/packet/af_packet.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2367,7 +2367,7 @@ static inline char *alloc_one_pg_vec_page(unsigned long order,
23672367
* __get_free_pages failed, fall back to vmalloc
23682368
*/
23692369
*flags |= PGV_FROM_VMALLOC;
2370-
buffer = vmalloc((1 << order) * PAGE_SIZE);
2370+
buffer = vzalloc((1 << order) * PAGE_SIZE);
23712371

23722372
if (buffer)
23732373
return buffer;

0 commit comments

Comments
 (0)