linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
	benh@kernel.crashing.org, paulus@samba.org
Cc: kernel-janitors@vger.kernel.org,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [v2] powerpc/prom: Avoid reference to potentially freed memory
Date: Wed, 21 Oct 2015 22:41:43 +1100 (AEDT)	[thread overview]
Message-ID: <20151021114143.EE9111409F8@ozlabs.org> (raw)
In-Reply-To: <1445031525-20086-1-git-send-email-christophe.jaillet@wanadoo.fr>

On Fri, 2015-16-10 at 21:38:45 UTC, Christophe Jaillet wrote:
> of_get_property() is used inside the loop, but then the reference to the
> node is dropped before dereferencing the prop pointer, which could by then
> point to junk if the node has been freed.
> 
> Instead use of_property_read_u32() to actually read the property
> value before dropping the reference.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/1856f50c66dff0afb4a6a3e2

cheers

      parent reply	other threads:[~2015-10-21 11:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16  6:14 [PATCH] powerpc/prom: Avoid reference to potentially freed memory Christophe JAILLET
2015-10-16  7:50 ` kbuild test robot
2015-10-16 10:02 ` Michael Ellerman
2015-10-16 20:09   ` Christophe JAILLET
2015-10-19  9:32     ` Michael Ellerman
2015-10-16 21:38 ` [PATCH v2] " Christophe JAILLET
2015-10-19  9:27   ` Michael Ellerman
2015-10-21  4:36     ` [PATCH v3] " Christophe JAILLET
2015-10-21 11:41   ` Michael Ellerman [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=20151021114143.EE9111409F8@ozlabs.org \
    --to=mpe@ellerman.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /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;
as well as URLs for NNTP newsgroup(s).