[prev in list] [next in list] [prev in thread] [next in thread]
List: linuxppc-embedded
Subject: Re: powerpc/mpic: Check if cpu_possible() in mpic_physmask()
From: Michael Ellerman <patch-notifications () ellerman ! id ! au>
Date: 2018-03-31 14:05:47
Message-ID: 40D0d75pJrz9s2t () ozlabs ! org
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic