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:	Fri, 9 Oct 2009 14:29:47 -0700
From:	Greg KH <gregkh@...e.de>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	Bruce Beare <bbeare1@...il.com>, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Cleanups for: line length, printk KERN_ argument,
 stack frame size > 2048 (added a kmalloc/kfree), style/formatting errors,
 incorrect include files

On Fri, Oct 09, 2009 at 02:27:42PM -0700, Randy Dunlap wrote:
> On Fri, 9 Oct 2009 14:16:10 -0700 Greg KH wrote:
> 
> > 
> > Try changing one thing at a time per patch please.
> > 
> > There's some bugs in here:
> > 
> > > -		struct config_t dig_in_config[32];
> > > -		struct config_t dig_out_config[32];
> > > -		struct config_t chan_in_config[32];
> > > -		struct config_t chan_out_config[32];
> > >  		int i;
> > > +		config_data = kmalloc(sizeof(struct config_data_t), GFP_KERNEL);
> > 
> > Shouldn't that be:
> > 		config_data = kmalloc(sizeof(struct config_data_t)*32, GFP_KERNEL);
> 
> The new struct already includes the [32]s.

Ah, missed that.

But your other comment about checking the kmalloc is valid.  We should
not add new calls to kmalloc that doesn't check, let's not _add_ new
errors to the code :)

Bruce, care to split this up into individual patches, each doing only
one thing, and check for the return value of this call?

thanks,

greg k-h
--
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