summary refs log tree commit diff stats
path: root/include/qemu/compiler.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2025-07-21 10:07:53 +0100
committerPeter Maydell <peter.maydell@linaro.org>2025-07-21 10:07:53 +0100
commit8ccd35f25cdf2e03f44585a11b7daf93d1d46a3a (patch)
tree9431b7706d60c8f1448e76e160247a041d3ab1f2 /include/qemu/compiler.h
parent655659a74a36b63e33d2dc969d3c44beb1b008b3 (diff)
downloadfocaccia-qemu-8ccd35f25cdf2e03f44585a11b7daf93d1d46a3a.tar.gz
focaccia-qemu-8ccd35f25cdf2e03f44585a11b7daf93d1d46a3a.zip
hw/misc/ivshmem-pci: Improve error handling
Coverity points out that the ivshmem-pci code has some error handling
cases where it incorrectly tries to use an invalid filedescriptor.
These generally happen because ivshmem_recv_msg() calls
qemu_chr_fe_get_msgfd(), which might return -1, but the code in
process_msg() generally assumes that the file descriptor was provided
when it was supposed to be. In particular:
 * the error case in process_msg() only needs to close the fd
   if one was provided
 * process_msg_shmem() should fail if no fd was provided

Coverity: CID 1508726
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 20250711145012.1521936-1-peter.maydell@linaro.org
Diffstat (limited to 'include/qemu/compiler.h')
0 files changed, 0 insertions, 0 deletions