]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86: avoid warning about potential shift wrapping bug
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 24 Nov 2014 13:35:24 +0000 (14:35 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 24 Nov 2014 15:53:50 +0000 (16:53 +0100)
commitb3512043e90f4014aafbfd15283bce00e284a3de
tree521f290d8ade86e3524565513314abc99b6d3540
parent0b5eeac4c1a6317cace7cebfdb43a28656335aa5
kvm: x86: avoid warning about potential shift wrapping bug

cs.base is declared as a __u64 variable and vector is a u32 so this
causes a static checker warning.  The user indeed can set "sipi_vector"
to any u32 value in kvm_vcpu_ioctl_x86_set_vcpu_events(), but the
value should really have 8-bit precision only.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/lapic.c
arch/x86/kvm/x86.c