lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DE7A311.5000406@netfilter.org>
Date:	Thu, 02 Jun 2011 16:49:53 +0200
From:	Pablo Neira Ayuso <pablo@...filter.org>
To:	Joe Perches <joe@...ches.com>
CC:	Patrick McHardy <kaber@...sh.net>,
	Andy Grover <andy.grover@...cle.com>,
	Jiri Kosina <trivial@...nel.org>,
	"David S. Miller" <davem@...emloft.net>,
	netfilter-devel@...r.kernel.org, netfilter@...r.kernel.org,
	coreteam@...filter.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, rds-devel@....oracle.com
Subject: Re: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc

David,

Are you going to take this patch? it includes one chunck which is out of
netfilter scope.

Thanks.

On 28/05/11 19:36, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@...ches.com>
> ---
>  net/netfilter/x_tables.c |    5 ++---
>  net/rds/ib_cm.c          |    6 ++----
>  2 files changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
> index b0869fe..71441b9 100644
> --- a/net/netfilter/x_tables.c
> +++ b/net/netfilter/x_tables.c
> @@ -776,12 +776,11 @@ static int xt_jumpstack_alloc(struct xt_table_info *i)
>  
>  	size = sizeof(void **) * nr_cpu_ids;
>  	if (size > PAGE_SIZE)
> -		i->jumpstack = vmalloc(size);
> +		i->jumpstack = vzalloc(size);
>  	else
> -		i->jumpstack = kmalloc(size, GFP_KERNEL);
> +		i->jumpstack = kzalloc(size, GFP_KERNEL);
>  	if (i->jumpstack == NULL)
>  		return -ENOMEM;
> -	memset(i->jumpstack, 0, size);
>  
>  	i->stacksize *= xt_jumpstack_multiplier;
>  	size = sizeof(void *) * i->stacksize;
> diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
> index fd453dd..6ecaf78 100644
> --- a/net/rds/ib_cm.c
> +++ b/net/rds/ib_cm.c
> @@ -374,23 +374,21 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
>  		goto out;
>  	}
>  
> -	ic->i_sends = vmalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
> +	ic->i_sends = vzalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
>  				   ibdev_to_node(dev));
>  	if (!ic->i_sends) {
>  		ret = -ENOMEM;
>  		rdsdebug("send allocation failed\n");
>  		goto out;
>  	}
> -	memset(ic->i_sends, 0, ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work));
>  
> -	ic->i_recvs = vmalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
> +	ic->i_recvs = vzalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
>  				   ibdev_to_node(dev));
>  	if (!ic->i_recvs) {
>  		ret = -ENOMEM;
>  		rdsdebug("recv allocation failed\n");
>  		goto out;
>  	}
> -	memset(ic->i_recvs, 0, ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work));
>  
>  	rds_ib_recv_init_ack(ic);
>  

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ