]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: zero base3 of unusable segments
authorRadim Krčmář <rkrcmar@redhat.com>
Thu, 18 May 2017 17:37:30 +0000 (19:37 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Fri, 19 May 2017 17:59:27 +0000 (19:59 +0200)
commit7a8b25d82510d3d3ce66d9f5b0841e489f62f6a9
tree9537fcc0cca299cb5a60a1eb4a7f05bbfd5e01a3
parent1f605a5aa63d94981bf465b7e6d0cecb3046e02f
KVM: x86: zero base3 of unusable segments

Static checker noticed that base3 could be used uninitialized if the
segment was not present (useable).  Random stack values probably would
not pass VMCS entry checks.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 9e17427875c9 ("KVM: x86 emulator: consolidate segment accessors")
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/x86.c