netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next-2.6] packet: use vzalloc()
@ 2010-11-20 17:31 Eric Dumazet
  2010-11-21  0:43 ` Neil Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2010-11-20 17:31 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Neil Horman

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>
---
 net/packet/af_packet.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index b6372dd..422705d 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,
 	 * __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;



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-21 18:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-20 17:31 [PATCH net-next-2.6] packet: use vzalloc() Eric Dumazet
2010-11-21  0:43 ` Neil Horman
2010-11-21 18:02   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).