qemu-e2k/util
Stefan Hajnoczi f708a5e71c aio: fix assert when remove poll during destroy
After iothread is enabled internally inside QEMU with GMainContext, we
may encounter this warning when destroying the iothread:

(qemu-system-x86_64:19925): GLib-CRITICAL **: g_source_remove_poll:
 assertion '!SOURCE_DESTROYED (source)' failed

The problem is that g_source_remove_poll() does not allow to remove one
source from array if the source is detached from its owner
context. (peterx: which IMHO does not make much sense)

Fix it on QEMU side by avoid calling g_source_remove_poll() if we know
the object is during destruction, and we won't leak anything after all
since the array will be gone soon cleanly even with that fd.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-id: 20170928025958.1420-6-peterx@redhat.com
[peterx: write the commit message]
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-10-03 14:36:19 -04:00
..
acl.c
aio-posix.c aio: fix assert when remove poll during destroy 2017-10-03 14:36:19 -04:00
aio-win32.c util/aio-win32: Only select on what we are actually waiting for 2017-07-17 15:58:37 +01:00
aiocb.c
async.c
base64.c
bitmap.c bitmap: provide to_le/from_le helpers 2017-09-22 14:11:25 +02:00
bitops.c bitmap: remove BITOP_WORD() 2017-09-22 14:11:23 +02:00
buffer.c
bufferiszero.c util: Introduce include/qemu/cpuid.h 2017-07-24 12:42:55 +01:00
cacheinfo.c configure: Drop AIX host support 2017-09-07 19:02:30 +01:00
compatfd.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
crc32c.c
cutils.c Convert remaining single line fprintf() to warn_report() 2017-09-19 16:20:49 +02:00
envlist.c
error.c error: Implement the warn and free Error functions 2017-07-13 13:50:19 +02:00
event_notifier-posix.c Remove/replace sysemu/char.h inclusion 2017-06-02 11:33:52 +04:00
event_notifier-win32.c
fifo8.c
getauxval.c
hbitmap.c qmp: add x-debug-block-dirty-bitmap-sha256 2017-07-11 17:44:59 +02:00
hexdump.c
host-utils.c
id.c
iohandler.c
iov.c
keyval.c qapi: Generate FOO_str() macro for QAPI enum FOO 2017-09-04 13:09:13 +02:00
lockcnt.c
log.c
main-loop.c Convert multi-line fprintf() to warn_report() 2017-09-19 14:09:34 +02:00
Makefile.objs scsi: move non-emulation specific code to scsi/ 2017-09-19 14:09:11 +02:00
memfd.c
mmap-alloc.c
module.c
notify.c
osdep.c osdep: Add runtime OFD lock detection 2017-08-11 14:12:44 +02:00
oslib-posix.c oslib-posix: Print errors before aborting on qemu_alloc_stack() 2017-08-30 09:33:49 +01:00
oslib-win32.c block: rip out all traces of password prompting 2017-07-11 17:44:56 +02:00
path.c
qdist.c
qemu-config.c
qemu-coroutine-io.c
qemu-coroutine-lock.c coroutine-lock: add qemu_co_rwlock_downgrade and qemu_co_rwlock_upgrade 2017-07-17 11:28:15 +08:00
qemu-coroutine-sleep.c
qemu-coroutine.c coroutine-lock: do not touch coroutine after another one has been entered 2017-06-07 14:39:00 +01:00
qemu-error.c error: Revert unwanted change of warning messages 2017-07-24 14:16:29 +02:00
qemu-openpty.c
qemu-option.c qapi: merge QInt and QFloat in QNum 2017-06-20 14:31:31 +02:00
qemu-progress.c
qemu-sockets.c util: remove the obsolete non-blocking connect 2017-09-05 13:21:58 +01:00
qemu-thread-posix.c util/qemu-thread-posix.c: Replace OS ifdefs with CONFIG_HAVE_SEM_TIMEDWAIT 2017-09-26 09:06:02 +03:00
qemu-thread-win32.c qemu-thread: Assert locks are initialized before using 2017-07-04 14:39:28 +02:00
qemu-timer-common.c
qemu-timer.c
qht.c
range.c
rcu.c Revert "rcu: do not create thread in pthread_atfork callback" 2017-08-08 10:40:19 +02:00
readline.c
stats64.c util: add stats64 module 2017-06-16 07:55:00 +08:00
systemd.c
thread-pool.c
throttle.c throttle: Assert that bkt->max is valid in throttle_compute_wait() 2017-09-26 14:46:23 +02:00
timed-average.c
trace-events docs: fix broken paths to docs/devel/tracing.txt 2017-07-31 13:12:53 +03:00
unicode.c
uri.c
uuid.c