linux-stable/arch
Juergen Gross ce1fd5a226 x86/kvm: fix vcpu-id indexed array sizes
commit 76b4f357d0 upstream.

KVM_MAX_VCPU_ID is the maximum vcpu-id of a guest, and not the number
of vcpu-ids. Fix array indexed by vcpu-id to have KVM_MAX_VCPU_ID+1
elements.

Note that this is currently no real problem, as KVM_MAX_VCPU_ID is
an odd number, resulting in always enough padding being available at
the end of those arrays.

Nevertheless this should be fixed in order to avoid rare problems in
case someone is using an even number for KVM_MAX_VCPU_ID.

Signed-off-by: Juergen Gross <jgross@suse.com>
Message-Id: <20210701154105.23215-2-jgross@suse.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-04 12:23:44 +02:00
..
alpha alpha: fix annotation of io{read,write}{16,32}be() 2020-08-26 10:31:02 +02:00
arc ARCv2: save ABI registers across signal handling 2021-06-30 08:48:24 -04:00
arm ARM: dts: versatile: Fix up interrupt controller node names 2021-07-31 08:22:38 +02:00
arm64 arm64: dts: ls208xa: remove bus-num from dspi node 2021-07-28 11:13:43 +02:00
c6x
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-23 15:00:58 +01:00
hexagon hexagon: use common DISCARDS macro 2021-07-20 16:16:13 +02:00
ia64 ia64: mca_drv: fix incorrect array size calculation 2021-07-20 16:15:46 +02:00
m68k m68k: q40: Fix info-leak in rtc_ioctl 2020-10-01 13:14:24 +02:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:34:53 +01:00
mips Revert "MIPS: add PMD table accounting into MIPS'pmd_alloc_one" 2021-07-28 11:13:49 +02:00
nds32 nds32: fix up stack guard gap 2021-07-28 11:13:51 +02:00
nios2
openrisc openrisc: Define memory barrier mb 2021-06-03 08:38:10 +02:00
parisc parisc: avoid a warning on u8 cast for cmpxchg on u8 pointers 2021-04-14 08:22:33 +02:00
powerpc KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow 2021-07-28 11:13:49 +02:00
riscv riscv: Workaround mcount name prior to clang-13 2021-05-22 10:59:49 +02:00
s390 s390/ftrace: fix ftrace_update_ftrace_func implementation 2021-07-28 11:13:49 +02:00
sh sh: dma: fix kconfig dependency for G2_DMA 2021-01-27 11:05:42 +01:00
sparc sparc64: Fix opcode filtering in handling of no fault loads 2021-03-30 14:36:58 +02:00
um um: fix error return code in winch_tramp() 2021-07-20 16:16:13 +02:00
unicore32
x86 x86/kvm: fix vcpu-id indexed array sizes 2021-08-04 12:23:44 +02:00
xtensa xtensa: uaccess: Add missing __user to strncpy_from_user() prototype 2020-12-02 08:48:10 +01:00
.gitignore
Kconfig mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race 2020-11-05 11:08:38 +01:00