Commit bfc71900 authored by Avi Kivity's avatar Avi Kivity Committed by Greg Kroah-Hartman
Browse files

KVM: Explicity initialize cpus_hardware_enabled



commit a4c0364b upstream.

Under CONFIG_MAXSMP, cpus_hardware_enabled is allocated from the heap and
not statically initialized.  This causes a crash on reboot when kvm thinks
vmx is enabled on random nonexistent cpus and accesses nonexistent percpu
lists.

Fix by explicitly clearing the variable.

Reported-and-tested-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 987ea1e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment