linux/arch
Christian Borntraeger a9ccf140a2 KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler
[ Upstream commit 0bc380beb7 ]

We do check for target CPU == -1, but this might change at the time we
are going to use it. Hold the physical target CPU in a local variable to
avoid out-of-bound accesses to the cpu arrays.

Cc: Pierre Morel <pmorel@linux.ibm.com>
Fixes: 87e28a15c4 ("KVM: s390: diag9c (directed yield) forwarding")
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-07-23 13:47:26 +02:00
..
alpha alpha: fix R_ALPHA_LITERAL reloc for large modules 2023-03-17 08:49:01 +01:00
arc ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard 2023-07-23 13:47:15 +02:00
arm ARM: dts: BCM5301X: fix duplex-full => full-duplex 2023-07-23 13:47:06 +02:00
arm64 arm64: dts: mediatek: mt8192: Fix CPUs capacity-dmips-mhz 2023-07-23 13:47:08 +02:00
csky kprobes: treewide: Cleanup the error messages for kprobes 2023-02-22 12:57:00 +01:00
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-01 08:27:21 +01:00
hexagon hexagon: Fix function name in die() 2023-02-01 08:27:20 +01:00
ia64 ia64: fix an addr to taddr in huge_pte_offset() 2023-05-11 23:00:39 +09:00
m68k m68k: Move signal frame following exception on 68020/030 2023-05-30 13:55:30 +01:00
microblaze exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
mips Remove DECnet support from kernel 2023-06-21 15:59:15 +02:00
nds32 exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
nios2 nios2: dts: Fix tse_mac "max-frame-size" property 2023-06-21 15:59:14 +02:00
openrisc openrisc: Properly store r31 to pt_regs on unhandled exceptions 2023-05-11 23:00:37 +09:00
parisc parisc: Delete redundant register definitions in <asm/assembly.h> 2023-07-05 18:25:05 +01:00
powerpc powerpc/mm/dax: Fix the condition when checking if altmap vmemap can cross-boundary 2023-07-23 13:47:14 +02:00
riscv riscv: uprobes: Restore thread.bad_cause 2023-07-23 13:47:13 +02:00
s390 KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler 2023-07-23 13:47:26 +02:00
sh sh: j2: Use ioremap() to translate device tree address into kernel memory 2023-07-23 13:47:20 +02:00
sparc sparc: allow PM configs for sparc32 COMPILE_TEST 2023-03-10 09:39:33 +01:00
um um: harddog: fix modular build 2023-06-09 10:32:22 +02:00
x86 x86/mm: Fix __swp_entry_to_pte() for Xen PV guests 2023-07-23 13:46:47 +02:00
xtensa xtensa: fix KASAN report for show_stack 2023-04-05 11:25:00 +02:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic 2022-08-17 14:23:00 +02:00