All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Xi Wang <xi.wang@gmail.com>
Cc: Jesper Juhl <jj@chaosbits.net>,
	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 15:49:20 -0700	[thread overview]
Message-ID: <20120411224920.GA1612@kroah.com> (raw)
In-Reply-To: <D26D474A-E696-447C-8B54-15295135368E@gmail.com>

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?

thanks,

greg k-h

  reply	other threads:[~2012-04-11 22:49 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 [this message]
2012-04-11 23:17     ` Jesper Juhl
2012-04-11 23:27       ` Greg Kroah-Hartman
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=20120411224920.GA1612@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.