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]
Date:	Sat, 01 Jun 2013 11:42:46 +0800
From:	Cong Wang <amwang@...hat.com>
To:	Joe Perches <joe@...ches.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [Patch net-next] icmp: avoid allocating large struct on stack

On Fri, 2013-05-31 at 20:34 -0700, Joe Perches wrote:
> On Sat, 2013-06-01 at 11:24 +0800, Cong Wang wrote:
> > struct icmp_bxm is a large struct, reduce stack usage
> > by allocating it on heap.
> []
> > diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
> []
> > @@ -558,6 +558,10 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
> >  		}
> >  	}
> >  
> > +	icmp_param = kzalloc(sizeof(*icmp_param), GFP_ATOMIC);
> 
> why kzalloc if the previous stack was uninitialized?
> 
> 

Right, kmalloc() should be sufficient here...


--
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