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 21:19:19 -0400
From:	Dmitry Torokhov <dtor@...ightbb.com>
To:	Om Narasimhan <om.turyx@...il.com>
Cc:	linux-kernel@...r.kernel.org, kernel-janitors@...ts.osdl.org,
	linux-atm-general@...ts.sourceforge.net
Subject: Re: kmalloc to kzalloc patches for drivers/atm

On Sunday 17 September 2006 20:53, Om Narasimhan wrote:
> --- a/drivers/atm/firestream.c
> +++ b/drivers/atm/firestream.c
> @@ -1784,7 +1784,7 @@ static int __devinit fs_init (struct fs_
>                 write_fs (dev, RAM, (1 << (28 - FS155_VPI_BITS - FS155_VCI_BITS)) - 1);
>                 dev->nchannels = FS155_NR_CHANNELS;
>         }
> -       dev->atm_vccs = kmalloc (dev->nchannels * sizeof (struct atm_vcc *),
> +       dev->atm_vccs = kzalloc (dev->nchannels * sizeof (struct atm_vcc *),
>                                  GFP_KERNEL);
>         fs_dprintk (FS_DEBUG_ALLOC, "Alloc atmvccs: %p(%Zd)\n",
>                     dev->atm_vccs, dev->nchannels * sizeof (struct atm_vcc *));
> 

kcalloc would be better here because you are allocating several objects
at once.

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