linux/arch/powerpc
Michael Ellerman 0834d627fb powerpc/mpic: Check if cpu_possible() in mpic_physmask()
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>
2018-03-30 23:34:22 +11:00
..
boot powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
configs powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
crypto crypto: hash - annotate algorithms taking optional key 2018-01-12 23:03:35 +11:00
include KVM changes for 4.16 2018-02-10 13:16:35 -08:00
kernel vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
kvm KVM changes for 4.16 2018-02-10 13:16:35 -08:00
lib Merge branch 'fixes' into next 2018-01-21 23:21:14 +11:00
math-emu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm Merge branch 'linus' into sched/urgent, to resolve conflicts 2018-02-06 21:12:31 +01:00
net bpf, ppc64: remove obsolete exception handling from div/mod 2018-01-26 16:42:06 -08:00
oprofile treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
perf Merge branch 'fixes' into next 2018-01-21 23:21:14 +11:00
platforms vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
purgatory License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysdev powerpc/mpic: Check if cpu_possible() in mpic_physmask() 2018-03-30 23:34:22 +11:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xmon powerpc/64s: Improve RFI L1-D cache flush fallback 2018-01-23 16:16:33 +11:00
Kconfig Merge branch 'linus' into sched/urgent, to resolve conflicts 2018-02-06 21:12:31 +01:00
Kconfig.debug powerpc: Add new kconfig CONFIG_PPC_IRQ_SOFT_MASK_DEBUG 2018-01-19 22:37:03 +11:00
Makefile powerpc/modules: Fix alignment of .toc section in kernel modules 2017-12-11 13:03:35 +11:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00