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

* Re: [PATCH net-next-2.6] packet: use vzalloc()
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Horman @ 2010-11-21  0:43 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev

On Sat, Nov 20, 2010 at 06:31:54PM +0100, Eric Dumazet wrote:
> 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>

Thanks Eric!

> ---
>  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	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next-2.6] packet: use vzalloc()
  2010-11-21  0:43 ` Neil Horman
@ 2010-11-21 18:02   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-11-21 18:02 UTC (permalink / raw)
  To: nhorman; +Cc: eric.dumazet, netdev

From: Neil Horman <nhorman@tuxdriver.com>
Date: Sat, 20 Nov 2010 19:43:48 -0500

> On Sat, Nov 20, 2010 at 06:31:54PM +0100, Eric Dumazet wrote:
>> 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>
> 
> Thanks Eric!

Applied, thanks everyone.

^ permalink raw reply	[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).