acrn-kernel/arch
Christian Borntraeger 86bfb18bad 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>
2023-07-19 16:21:57 +02:00
..
alpha mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
arc ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard 2023-07-19 16:21:42 +02:00
arm ARM: dts: lan966x: kontron-d10: fix SPI CS 2023-07-19 16:21:34 +02:00
arm64 arm64: sme: Use STR P to clear FFR context field in streaming SVE mode 2023-07-19 16:21:45 +02:00
csky csky: fix up lock_mm_and_find_vma() conversion 2023-07-01 13:16:27 +02:00
hexagon mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
ia64 mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
loongarch mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
m68k mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
microblaze mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
mips mips/mm: Convert to using lock_mm_and_find_vma() 2023-07-01 13:16:24 +02:00
nios2 mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
openrisc mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
parisc parisc: fix expand_stack() conversion 2023-07-01 13:16:26 +02:00
powerpc powerpc/mm/dax: Fix the condition when checking if altmap vmemap can cross-boundary 2023-07-19 16:21:40 +02:00
riscv riscv: uprobes: Restore thread.bad_cause 2023-07-19 16:21:40 +02:00
s390 KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler 2023-07-19 16:21:57 +02:00
sh sh: Avoid using IRQ0 on SH3 and SH4 2023-07-19 16:21:54 +02:00
sparc sparc32: fix lock_mm_and_find_vma() conversion 2023-07-01 13:16:26 +02:00
um mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
x86 x86/efi: Make efi_set_virtual_address_map IBT safe 2023-07-19 16:21:45 +02:00
xtensa mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
.gitignore
Kconfig