1
0
Fork 0
alistair23-linux/tools
Dan Carpenter be7fcf1d17 KVM: selftests: Fix a condition in test_hv_cpuid()
The code is trying to check that all the padding is zeroed out and it
does this:

    entry->padding[0] == entry->padding[1] == entry->padding[2] == 0

Assume everything is zeroed correctly, then the first comparison is
true, the next comparison is false and false is equal to zero so the
overall condition is true.  This bug doesn't affect run time very
badly, but the code should instead just check that all three paddings
are zero individually.

Also the error message was copy and pasted from an earlier error and it
wasn't correct.

Fixes: 7edcb73433 ("KVM: selftests: Add hyperv_cpuid test")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-24 21:27:04 +02:00
..
accounting delayacct: track delays from thrashing cache pages 2018-10-26 16:26:32 -07:00
arch Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-19 11:20:22 -07:00
bpf bpftool: exclude bash-completion/bpftool from .gitignore pattern 2019-05-04 23:43:57 -07:00
build tools build: Implement libzstd feature check, LIBZSTD_DIR and NO_LIBZSTD defines 2019-04-01 15:18:10 -03:00
cgroup
crypto crypto: user - rename err_cnt parameter 2018-12-07 14:15:00 +08:00
debugging tools: add a kernel-chktaint to tools/debugging 2019-01-08 16:29:52 -07:00
firewire
firmware tools/firmware/ihex2fw: Replace explicit alignment with ALIGN 2019-01-22 10:23:18 +01:00
gpio tools gpio: Allow overriding CFLAGS 2018-12-28 16:33:08 -03:00
hv Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1 2018-11-11 12:58:27 -08:00
iio Merge 5.0-rc6 into staging-next 2019-02-11 09:25:01 +01:00
include tools: bpf: synchronise BPF UAPI header with tools 2019-05-13 01:12:45 +02:00
io_uring tools/io_uring: remove IOCQE_FLAG_CACHEHIT 2019-04-08 10:48:50 -06:00
kvm/kvm_stat tools/kvm_stat: switch to python3 2018-11-27 12:53:44 +01:00
laptop
leds
lib perf/core improvements and fixes: 2019-05-18 10:24:43 +02:00
memory-model tools/memory-model: Add support for synchronize_srcu_expedited() 2019-04-04 13:48:34 -07:00
nfsd
objtool Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-19 10:23:24 -07:00
pci perf/core improvements and fixes: 2019-05-18 10:24:43 +02:00
pcmcia
perf perf stat: Support 'percore' event qualifier 2019-05-16 14:17:24 -03:00
power Merge branch 'x86-mds-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-14 07:57:29 -07:00
scripts
spi spi: spidev_test: Improve decoded text part of hex dump 2018-09-04 17:00:37 +01:00
testing KVM: selftests: Fix a condition in test_hv_cpuid() 2019-05-24 21:27:04 +02:00
thermal/tmon tools thermal tmon: Use -O3 instead of -O1 if available 2019-01-04 12:54:49 -03:00
time
usb usbip: tools: fix atoi() on non-null terminated string 2018-10-18 19:44:39 +02:00
virtio tools/virtio/ringtest: Remove bogus definition of BUG_ON() 2019-05-12 13:11:35 -04:00
vm tools/vm/slabinfo: clean up usage menu debug items 2019-03-05 21:07:20 -08:00
wmi
Makefile Merge branch 'thorsten' into docs-next 2019-01-08 16:38:36 -07:00