linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Darren Stevens <darren@stevens-zone.net>, linuxppc-dev@lists.ozlabs.org
Cc: Pat Wall <pjwall@mac.com>,
	rtd@a-eon.com, aperez@alexperez.com,
	Christian Zigotzky <chzigotzky@xenosoft.de>
Subject: Re: powerpc: Add missing error check to prom_find_boot_cpu()
Date: Fri, 27 Jan 2017 11:33:00 +1100 (AEDT)	[thread overview]
Message-ID: <3v8frs0RLyz9t1B@ozlabs.org> (raw)
In-Reply-To: <497a1d88a93.7082e0e9@auth.smtp.1and1.co.uk>

On Mon, 2017-01-23 at 19:42:54 UTC, Darren Stevens wrote:
> prom_init.c calls 'instance-to-package' twice, but the return
> is not checked during prom_find_boot_cpu(). The result is then
> passed to prom_getprop, which could be PROM_ERROR.
> Add a return check to prevent this.
> 
> This was found on a pasemi system, where CFE doesn't have a working
> 'instance-to package' prom call.
> Before Commit 5c0484e25ec0 ('powerpc: Endian safe trampoline') the
> area around addr 0 as mostly 0's and this doesn't cause a problem.
> Once the macro 'FIXUP_ENDIAN' has been added to head_64.S, the low
> memory area now has non-zero values, which cause the prom_getprop
> call to hang.
> 
> Signed-off-by: Darren Stevens <darren@stevens-zone.net>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/af2b7fa17eb92e52b65f96604448ff

cheers

  reply	other threads:[~2017-01-27  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 19:42 [PATCH] powerpc: Add missing error check to prom_find_boot_cpu() Darren Stevens
2017-01-27  0:33 ` Michael Ellerman [this message]
2017-01-27 13:05   ` Darren Stevens

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=3v8frs0RLyz9t1B@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=aperez@alexperez.com \
    --cc=chzigotzky@xenosoft.de \
    --cc=darren@stevens-zone.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=pjwall@mac.com \
    --cc=rtd@a-eon.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;
as well as URLs for NNTP newsgroup(s).