[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/7] iothread: check iothread->ctx before aio_context
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 3/7] iothread: check iothread->ctx before aio_context_unref to avoid assertion |
Date: |
Wed, 28 Sep 2016 19:15:33 +0100 |
From: Lin Ma <address@hidden>
if iothread->ctx is set to NULL, aio_context_unref triggers the assertion:
g_source_unref: assertion 'source != NULL' failed.
The patch fixes it.
Signed-off-by: Lin Ma <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
iothread.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/iothread.c b/iothread.c
index fb08a60..fbeb8de 100644
--- a/iothread.c
+++ b/iothread.c
@@ -75,6 +75,9 @@ static void iothread_instance_finalize(Object *obj)
iothread_stop(obj, NULL);
qemu_cond_destroy(&iothread->init_done_cond);
qemu_mutex_destroy(&iothread->init_done_lock);
+ if (!iothread->ctx) {
+ return;
+ }
aio_context_unref(iothread->ctx);
}
--
2.7.4
- [Qemu-devel] [PULL 0/7] Block patches, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 1/7] block: mirror: fix wrong comment of mirror_start, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 2/7] aio-posix: avoid unnecessary aio_epoll_enabled() calls, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 5/7] coroutine: add qemu_coroutine_entered() function, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 7/7] linux-aio: fix re-entrant completion processing, Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 4/7] libqos: fix qvring_init(), Stefan Hajnoczi, 2016/09/28
- [Qemu-devel] [PULL 3/7] iothread: check iothread->ctx before aio_context_unref to avoid assertion,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 6/7] test-coroutine: test qemu_coroutine_entered(), Stefan Hajnoczi, 2016/09/28
- Re: [Qemu-devel] [PULL 0/7] Block patches, Peter Maydell, 2016/09/28