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:	Sun, 17 Sep 2006 19:27:03 -0700
From:	"Om Narasimhan" <om.turyx@...il.com>
To:	"Dmitry Torokhov" <dtor@...ightbb.com>
Cc:	linux-kernel@...r.kernel.org, kernel-janitors@...ts.osdl.org
Subject: Re: kmalloc to kzalloc patches for drivers/base

On 9/17/06, Dmitry Torokhov <dtor@...ightbb.com> wrote:
> On Sunday 17 September 2006 20:53, Om Narasimhan wrote:
> > diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> > index 2b8755d..e08950b 100644
> > --- a/drivers/base/platform.c
> > +++ b/drivers/base/platform.c
> > @@ -192,7 +192,7 @@ int platform_device_add_resources(struct
> > {
> > struct resource *r;
> >
> > -r = kmalloc(sizeof(struct resource) * num, GFP_KERNEL);
> > +r = kzalloc(sizeof(struct resource) * num, GFP_KERNEL);
> > if (r) {
> > memcpy(r, res, sizeof(struct resource) * num);
> > pdev->resource = r;
>
> Just out of curiosity could you tell me what is the benefit of
> zeroing allocated memory here?
My mistake. :-D
>
> > @@ -216,7 +216,7 @@ int platform_device_add_data(struct plat
> > {
> > void *d;
> >
> > -d = kmalloc(size, GFP_KERNEL);
> > +d = kzalloc(size, GFP_KERNEL);
> > if (d) {
> > memcpy(d, data, size);
> > pdev->dev.platform_data = d;
> >
>
> And here?
Mea Culpa :-D

Thanks for the comment.
Regards,
Om.
-
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