]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Silence underflow warning in avic_get_physical_id_entry()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 18 May 2017 07:38:53 +0000 (10:38 +0300)
committerRadim Krčmář <rkrcmar@redhat.com>
Thu, 18 May 2017 12:53:54 +0000 (14:53 +0200)
commit38da64f8e080b7cb4b3e7895ff4df7afa6eb3b5d
tree3af3c47ff972a64d9745d6801856005045060a43
parentc505e010fb1be55e1c0c25878d114d3afa67a772
KVM: Silence underflow warning in avic_get_physical_id_entry()

Smatch complains that we check cap the upper bound of "index" but don't
check for negatives.  It's a false positive because "index" is never
negative.  But it's also simple enough to make it unsigned which makes
the code easier to audit.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/svm.c