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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 10 Aug 2010 00:01:21 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	joe@...ches.com
Cc:	anirban.chakraborty@...gic.com, error27@...il.com,
	amit.salecha@...gic.com, Linux-Driver@...gic.com,
	sucheta.chakraborty@...gic.com, netdev@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch 2/2] qlcnic: using too much stack

From: Joe Perches <joe@...ches.com>
Date: Mon, 09 Aug 2010 20:39:06 -0700

> On Mon, 2010-08-09 at 20:31 -0700, Anirban Chakraborty wrote:
>> On Aug 10, 2010, at 7:33 AM, Joe Perches wrote:
>> > On Mon, 2010-08-09 at 18:43 -0700, Anirban Chakraborty wrote:
>> >> Your patch is fine except that the preferred way is to use kzalloc over kaclloc. kzalloc does not need that extra
>> >> argument that you are passing to kcalloc.
>> > You probably meant to write "my preferred way"
>> > as the kcalloc to "kzalloc with a multiply"
>> > ratio is pretty high.
>> I was suggesting based on the following:
>> http://lwn.net/Articles/147014/
> 
> Note that article suggests kzalloc for allocating
> a single zeroed object.
> 
> kcalloc is used for multiple zeroed objects and
> protects against oversized allocations.

Agreed, kcalloc should be used 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