From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jesper Juhl <jj@chaosbits.net>
Cc: Xi Wang <xi.wang@gmail.com>,
linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
Joe Perches <joe@perches.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
Forest Bond <forest@alittletooquiet.net>
Subject: Re: [PATCH] staging: vt6656: Don't leak memory in drivers/staging/vt6656/ioctl.c::private_ioctl()
Date: Wed, 11 Apr 2012 16:27:20 -0700 [thread overview]
Message-ID: <20120411232720.GA32500@kroah.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1204120106280.2137@swampdragon.chaosbits.net>
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.
> 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.
greg k-h
next prev parent reply other threads:[~2012-04-11 23:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 22:35 [PATCH] staging: vt6656: Don't leak memory in drivers/staging/vt6656/ioctl.c::private_ioctl() Jesper Juhl
2012-04-11 22:46 ` Xi Wang
2012-04-11 22:49 ` Greg Kroah-Hartman
2012-04-11 23:17 ` Jesper Juhl
2012-04-11 23:27 ` Greg Kroah-Hartman [this message]
2012-04-11 23:37 ` Jesper Juhl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120411232720.GA32500@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=jj@chaosbits.net \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xi.wang@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.