qemu-e2k/util
Eric Blake f61ffad53f qemu-coroutine-sleep: Silence Coverity warning
Coverity warns that we store the address of a stack variable through a
pointer passed in by the caller, which would let the caller trivially
trigger use-after-free if that stored value is still present when we
finish execution.  However, the way coroutines work is that after our
call to qemu_coroutine_yield(), control is temporarily continued in
the caller prior to our function concluding, and in order to resume
our coroutine, the caller must poll until the variable has been set to
NULL.  Thus, we can add an assert that we do not leak stack storage to
the caller on function exit.

Fixes: Coverity CID 1406474
CC: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20191111203524.21912-1-eblake@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2019-11-18 16:01:34 -06:00
..
aio-posix.c
aio-wait.c
aio-win32.c
aiocb.c
async.c util/async: avoid useless cast 2019-10-24 19:26:05 +02:00
atomic64.c
base64.c
bitmap.c
bitops.c
buffer.c
bufferiszero.c
cacheinfo.c Fix cacheline detection on FreeBSD/powerpc. 2019-09-19 14:42:13 +02:00
compatfd.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
crc32c.c
cutils.c
drm.c
envlist.c
error.c
event_notifier-posix.c event_notifier: avoid dandling file descriptor in event_notifier_cleanup 2019-10-24 19:26:52 +02:00
event_notifier-win32.c
fifo8.c
filemonitor-inotify.c
filemonitor-stub.c
getauxval.c
guest-random.c
hbitmap.c hbitmap: handle set/reset with zero length 2019-10-28 11:22:30 +01:00
hexdump.c
host-utils.c
id.c
iov.c util/ioc.c: try to reassure Coverity about qemu_iovec_init_extended 2019-10-08 14:27:35 +01:00
iova-tree.c
keyval.c
lockcnt.c
log.c plugin: add qemu_plugin_outs helper 2019-10-28 15:12:38 +00:00
main-loop.c Do not use %m in common code to print error messages 2019-10-22 09:38:42 +02:00
Makefile.objs util: introduce SharedResource 2019-10-28 11:22:31 +01:00
memfd.c linux-user: add memfd_create 2019-09-11 08:46:17 +02:00
mmap-alloc.c core: replace getpagesize() with qemu_real_host_page_size 2019-10-26 15:38:06 +02:00
module.c module: return success on module load 2019-08-21 16:29:57 +02:00
notify.c xen / notify: introduce a new XenWatchList abstraction 2019-09-24 12:18:47 +01:00
osdep.c
oslib-posix.c core: replace getpagesize() with qemu_real_host_page_size 2019-10-26 15:38:06 +02:00
oslib-win32.c core: replace getpagesize() with qemu_real_host_page_size 2019-10-26 15:38:06 +02:00
pagesize.c
path.c
qdist.c
qemu-co-shared-resource.c util: introduce SharedResource 2019-10-28 11:22:31 +01:00
qemu-config.c
qemu-coroutine-io.c yield_until_fd_readable: make it work with any AioContect 2019-10-25 14:38:29 +02:00
qemu-coroutine-lock.c
qemu-coroutine-sleep.c qemu-coroutine-sleep: Silence Coverity warning 2019-11-18 16:01:34 -06:00
qemu-coroutine.c
qemu-error.c
qemu-openpty.c
qemu-option.c
qemu-print.c
qemu-progress.c
qemu-sockets.c util/qemu-sockets: fix keep_alive handling in inet_connect_saddr 2019-09-25 08:15:44 -05:00
qemu-thread-common.h
qemu-thread-posix.c qemu-thread: Add qemu_cond_timedwait 2019-09-16 17:13:06 +02:00
qemu-thread-win32.c qemu-thread: Add qemu_cond_timedwait 2019-09-16 17:13:06 +02:00
qemu-timer-common.c
qemu-timer.c qemu-timer: reuse MIN macro in qemu_timeout_ns_to_ms 2019-10-24 20:10:18 +02:00
qht.c
qsp.c qemu-thread: Add qemu_cond_timedwait 2019-09-16 17:13:06 +02:00
range.c
rcu.c
readline.c
stats64.c
sys_membarrier.c
systemd.c Do not use %m in common code to print error messages 2019-10-22 09:38:42 +02:00
thread-pool.c
throttle.c
timed-average.c
trace-events socket: Add backlog parameter to socket_listen 2019-09-03 23:24:42 +02:00
unicode.c
uri.c
uuid.c
vfio-helpers.c core: replace getpagesize() with qemu_real_host_page_size 2019-10-26 15:38:06 +02:00