public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Emil Goode <emilgoode@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: omar.ramirez@copitl.com, gregkh@linuxfoundation.org,
	justinmattock@gmail.com, andriy.shevchenko@linux.intel.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] staging: tidspbridge: Fix potential NULL pointer dereference
Date: Wed, 12 Jun 2013 17:33:42 +0200	[thread overview]
Message-ID: <20130612153342.GA13788@debian> (raw)
In-Reply-To: <20130612150817.GA12624@mwanda>

Thank you Dan! That's right, It's of course not NULL after freed.
Yes the code looks strange here, I'm not sure what was intended.

Best regards,

Emil

On Wed, Jun 12, 2013 at 08:08:17AM -0700, Dan Carpenter wrote:
> 1) This patch doesn't do anything.  "dcd_key" points to freed memory
> but it's not a NULL pointer.
> 2) The original pointer doesn't dereference "dcd_key" it just takes
> the address of one of the elements.  I don't know the context and
> can't say for sure that it's a wrong thing to do.
> 
> The code does look very suspect.  Why is it checking permisions
> after we already removed the element and freed it?
> 
> But it's not a dereferencing freed memory bug.
> 
> regards,
> dan carpenter
> 

      reply	other threads:[~2013-06-12 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 14:33 [PATCH] staging: tidspbridge: Fix potential NULL pointer dereference Emil Goode
2013-06-12 15:08 ` Dan Carpenter
2013-06-12 15:33   ` Emil Goode [this message]

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=20130612153342.GA13788@debian \
    --to=emilgoode@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=justinmattock@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=omar.ramirez@copitl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox