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:	Thu, 21 Sep 2006 09:36:39 -0400
From:	"Dmitry Torokhov" <dmitry.torokhov@...il.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 [sane version]

Hi,

On 9/21/06, Om Narasimhan <om.turyx@...il.com> wrote:
> -       dev->atm_vccs = kmalloc (dev->nchannels * sizeof (struct atm_vcc *),
> +       dev->atm_vccs = kcalloc (sizeof (struct atm_vcc *), dev->nchannels,
>                                 GFP_KERNEL);

kcalloc's first argument is number of elements to allocate, size is
the second argument.

>
> -       scq = (struct scq_info *) kmalloc(sizeof(struct scq_info), GFP_KERNEL);
> +       scq = (struct scq_info *) kzalloc(sizeof(struct scq_info), GFP_KERNEL);

Kill this cast please.

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