qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kvm_set_user_memory_region() doesn't check ioctl return value


From: Peter Maydell
Subject: kvm_set_user_memory_region() doesn't check ioctl return value
Date: Tue, 7 Jan 2020 14:52:05 +0000

Coverity has just pointed out (CID 1412229) that the function
kvm_set_user_memory_region() in accel/kvm/kvm-all.c calls
kvm_vm_ioctl(s, KVM_SET_USER_MEMORY_REGION, ...) twice, but
it only checks the ioctl return value for failure in the
second case. Shouldn't it be checking both calls?

(This code seems to have been in place for years so I guess
Coverity has only just decided that kvm_vm_ioctl() passes its
'needs return value checking' heuristic...)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]