qemu-e2k/accel
Peter Maydell d12dd9c7ee accel/kvm: Avoid Coverity warning in query_stats()
Coverity complains that there is a codepath in the query_stats()
function where it can leak the memory pointed to by stats_list.  This
can only happen if the caller passes something other than
STATS_TARGET_VM or STATS_TARGET_VCPU as the 'target', which no
callsite does.  Enforce this assumption using g_assert_not_reached(),
so that if we have a future bug we hit the assert rather than
silently leaking memory.

Resolves: Coverity CID 1490140
Fixes: cc01a3f4ca ("kvm: Support for querying fd-based stats")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220719134853.327059-1-peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-07-22 19:01:44 +02:00
..
hvf Fix 'writeable' typos 2022-06-08 19:38:47 +01:00
kvm accel/kvm: Avoid Coverity warning in query_stats() 2022-07-22 19:01:44 +02:00
qtest misc: Remove unnecessary "sysemu/cpu-timers.h" include 2022-03-06 13:15:42 +01:00
stubs accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function 2022-07-20 12:15:08 +01:00
tcg linux-user/aarch64: Do not clear PROT_MTE on mprotect 2022-07-18 13:20:13 +01:00
xen sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
Kconfig Add NVMM accelerator: configure and build logic 2021-05-04 14:15:34 +02:00
accel-common.c accel: Introduce current_accel_name() 2022-06-27 11:18:17 +01:00
accel-softmmu.c accel: autoload modules 2021-07-09 18:21:33 +02:00
accel-softmmu.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
accel-user.c accel: extend AccelState and AccelClass to user-mode 2021-02-05 10:24:15 -10:00
dummy-cpus.c accel: move qtest CpusAccel functions to a common location 2020-10-24 07:23:19 +02:00
meson.build accel/meson: Only build hw virtualization with system emulation 2022-03-06 13:15:42 +01:00