You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/accel/kvm
Markus Armbruster 88be119fb1 kvm: Fix kvm_vm_ioctl() and kvm_device_ioctl() return value
These functions wrap ioctl().  When ioctl() fails, it sets @errno.
The wrappers then return that @errno negated.

Except they call accel_ioctl_end() between calling ioctl() and reading
@errno.  accel_ioctl_end() can clobber @errno, e.g. when a futex()
system call fails.  Seems unlikely, but it's a bug all the same.

Fix by retrieving @errno before calling accel_ioctl_end().

Fixes: a27dd2de68 (KVM: keep track of running ioctls)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251128152050.3417834-1-armbru@redhat.com>
3 days ago
..
kvm-accel-ops.c accel: make all calls to qemu_process_cpu_events look the same 3 months ago
kvm-all.c kvm: Fix kvm_vm_ioctl() and kvm_device_ioctl() return value 3 days ago
kvm-cpus.h accel/kvm: Remove unused 'system/cpus.h' header in kvm-cpus.h 9 months ago
meson.build target/i386/kvm: Restrict SEV stubs to x86 architecture 4 years ago
trace-events KVM: Dynamic sized kvm memslots array 1 year ago
trace.h trace: switch position of headers to what Meson requires 5 years ago