]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: apic: avoid calculating pending eoi from an uninitialized val
authorMiaohe Lin <linmiaohe@huawei.com>
Fri, 21 Feb 2020 14:04:46 +0000 (22:04 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Feb 2020 17:05:44 +0000 (18:05 +0100)
commite91b348a3443a354cdc7cf26271c2621af7196f5
tree7403554d511783e315f74b9495b093b6610a32c9
parentd7537f0907fa9b470fde6b6e375866ba50f98e08
KVM: apic: avoid calculating pending eoi from an uninitialized val

When pv_eoi_get_user() fails, 'val' may remain uninitialized and the return
value of pv_eoi_get_pending() becomes random. Fix the issue by initializing
the variable.

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c