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] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0902270944220.25593@gandalf.stny.rr.com>
Date:	Fri, 27 Feb 2009 09:46:20 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 2/5] tracing: add tracer dependent options to options
 directory


On Thu, 26 Feb 2009, Andrew Morton wrote:

> On Fri, 27 Feb 2009 00:34:12 -0500 Steven Rostedt <rostedt@...dmis.org> wrote:
> 
> > +	topts = kzalloc(sizeof(*topts) * (cnt + 1), GFP_KERNEL);
> 
> nit: kcalloc() checks for multiplicative overflow, whereas the above
> does not.  It sets a good example ;)

Thanks, I'll have to add that to my clean ups. I originally had it as 
kmalloc, and just set the last entry to NULL by hand. Then I realized 
that if an error happened during initialization of one of the entries, it 
may not be NULL, so I went back and changed it to kzalloc, never thinking 
about kcalloc.

-- Steve

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