提交 bbce5a59 编写于 作者: E Eric Dumazet 提交者: David S. Miller

packet: use vzalloc()

alloc_one_pg_vec_page() is supposed to return zeroed memory, so use
vzalloc() instead of vmalloc()
Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Acked-by: NNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9a2d09cf
...@@ -2367,7 +2367,7 @@ static inline char *alloc_one_pg_vec_page(unsigned long order, ...@@ -2367,7 +2367,7 @@ static inline char *alloc_one_pg_vec_page(unsigned long order,
* __get_free_pages failed, fall back to vmalloc * __get_free_pages failed, fall back to vmalloc
*/ */
*flags |= PGV_FROM_VMALLOC; *flags |= PGV_FROM_VMALLOC;
buffer = vmalloc((1 << order) * PAGE_SIZE); buffer = vzalloc((1 << order) * PAGE_SIZE);
if (buffer) if (buffer)
return buffer; return buffer;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册