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.LNX.2.00.1204120133560.2137@swampdragon.chaosbits.net>
Date:	Thu, 12 Apr 2012 01:37:19 +0200 (CEST)
From:	Jesper Juhl <jj@...osbits.net>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
cc:	Xi Wang <xi.wang@...il.com>, linux-kernel@...r.kernel.org,
	devel@...verdev.osuosl.org, Joe Perches <joe@...ches.com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Forest Bond <forest@...ttletooquiet.net>
Subject: Re: [PATCH] staging: vt6656: Don't leak memory in
 drivers/staging/vt6656/ioctl.c::private_ioctl()

On Wed, 11 Apr 2012, Greg Kroah-Hartman wrote:

> On Thu, Apr 12, 2012 at 01:17:52AM +0200, Jesper Juhl wrote:
> > On Wed, 11 Apr 2012, Greg Kroah-Hartman wrote:
> > 
> > > On Wed, Apr 11, 2012 at 06:46:33PM -0400, Xi Wang wrote:
> > > > On Apr 11, 2012, at 6:35 PM, Jesper Juhl wrote:
> > > > 
> > > > > -		pNodeList = (PSNodeList)kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);
> > > > > +		pNodeList = kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);
> > > > 
> > > > Can you also remove casts like "(int)GFP_ATOMIC"?
> > > > 
> > > > The parentheses "(sNodeList.uItem * sizeof(SNodeItem))" are also
> > > > pointless..
> > > 
> > > One thing at a time, odds are this is an "automated" patch, right
> > > Jesper?
> > > 
> > 
> > I'm not quite sure what you mean by "automated patch" Greg. Manually 
> > editing the file in emacs, then running "git format-patch", followed by 
> > importing the patch file into alpine and sending it off surely didn't 
> > feel "automated" ;-)
> 
> Sorry, I thought this was scripted, my apologies.
> 
No need for apologies. Not at all.
But I'm currious to learn that some people submit entirely 
scripted/automated patches - I didn't expect that... Ohh well, you live 
and learn ;-)


> > The only reason I even included the change of the return value cast was 
> > that it was the variable I was focusing on with regards to fixing the 
> > leak, so it felt "sufficiently related" to include in the same patch.
> > I certainly was not on a mission to clean up the file in general - just 
> > fixing the leak was all that was really on the agenda.
> > I don't *mind* fixing up other issues in the file - sure, I can do that, 
> > but that's an entirely different set of patches then...
> 
> I agree, this patch is fine as-is, thanks.
> 
You are welcome :-)

-- 
Jesper Juhl <jj@...osbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

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