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: <1281556723.1861.3.camel@cowboy>
Date:	Wed, 11 Aug 2010 15:58:43 -0400
From:	Davidlohr Bueso <dave@....org>
To:	Joe Perches <joe@...ches.com>
Cc:	Dave Airlie <airlied@...hat.com>, Dave Airlie <airlied@...ux.ie>,
	eric@...olt.net, dri-devel <dri-devel@...ts.freedesktop.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] DRM: Replace kmalloc/memset combos with kzalloc

On Wed, 2010-08-11 at 07:35 -0700, Joe Perches wrote:
> On Wed, 2010-08-11 at 09:18 -0400, Davidlohr Bueso wrote:
> > memory allocation in drm_bufs.c is followed by initializing the memory with 0.
> > 
> > Replace the use of kmalloc+memset with kzalloc.
> 
> Perhaps kzalloc's with a multiply could/should also be converted
> to kcalloc.
> 
> > +	entry->buflist = kzalloc(count * sizeof(*entry->buflist), GFP_KERNEL);
> 
> 	entry->buflist = kcalloc(count, sizeof(*entry->buflist), GFP_KERNEL);
> 
> etc.
> 
> > +	entry->buflist = kzalloc(count * sizeof(*entry->buflist), GFP_KERNEL);
> > +	entry->seglist = kzalloc(count * sizeof(*entry->seglist), GFP_KERNEL);
> > +	entry->buflist = kzalloc(count * sizeof(*entry->buflist),
> > +	entry->buflist = kzalloc(count * sizeof(*entry->buflist),
> 

Doable, but don't see much difference. David, what do you think?

Thanks,
Davidlohr

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ