All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Cc: npiggin@gmail.com
Subject: Re: powerpc/mpic: Check if cpu_possible() in mpic_physmask()
Date: Sun,  1 Apr 2018 01:05:47 +1100 (AEDT)	[thread overview]
Message-ID: <40D0d75pJrz9s2t@ozlabs.org> (raw)
In-Reply-To: <20180331140024.1610-1-mpe@ellerman.id.au>

On Sat, 2018-03-31 at 14:00:24 UTC, Michael Ellerman wrote:
> In mpic_physmask() we loop over all CPUs up to 32, then get the hard
> SMP processor id of that CPU.
> 
> Currently that's possibly walking off the end of the paca array, but
> in a future patch we will change the paca array to be an array of
> pointers, and in that case we will get a NULL for missing CPUs and
> oops. eg:
> 
>   Unable to handle kernel paging request for data at address 0x88888888888888b8
>   Faulting instruction address: 0xc00000000004e380
>   Oops: Kernel access of bad area, sig: 11 [#1]
>   ...
>   NIP .mpic_set_affinity+0x60/0x1a0
>   LR  .irq_do_set_affinity+0x48/0x100
> 
> Fix it by checking the CPU is possible, this also fixes the code if
> there are gaps in the CPU numbering which probably never happens on
> mpic systems but who knows.
> 
> Debugged-by: Nicholas Piggin <npiggin@gmail.com>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/0834d627fbea00c1444075eb3e448e

cheers

      reply	other threads:[~2018-03-31 14:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-31 14:00 [PATCH] powerpc/mpic: Check if cpu_possible() in mpic_physmask() Michael Ellerman
2018-03-31 14:05 ` 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=40D0d75pJrz9s2t@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@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.