[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/25] aio: test node->deleted before calling io_flu
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 07/25] aio: test node->deleted before calling io_flush |
Date: |
Fri, 26 Oct 2012 16:05:37 +0200 |
Otherwise, there could be a case where io_flush accesses freed
memory because it should not have been called.
Signed-off-by: Paolo Bonzini <address@hidden>
---
aio.c | 2 +-
1 file modificato, 1 inserzione(+). 1 rimozione(-)
diff --git a/aio.c b/aio.c
index c89f1e9..734d2cf 100644
--- a/aio.c
+++ b/aio.c
@@ -122,7 +122,7 @@ bool aio_wait(AioContext *ctx)
* Otherwise, if there are no AIO requests, qemu_aio_wait() would
* wait indefinitely.
*/
- if (node->io_flush) {
+ if (!node->deleted && node->io_flush) {
if (node->io_flush(node->opaque) == 0) {
continue;
}
--
1.7.12.1
- [Qemu-devel] [PATCH 00/25] AioContext & threadpool, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 01/25] event_notifier: add Win32 implementation, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 03/25] aio: change qemu_aio_set_fd_handler to return void, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 04/25] aio: provide platform-independent API, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 05/25] aio: introduce AioContext, move bottom halves there, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 07/25] aio: test node->deleted before calling io_flush,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 11/25] aio: make AioContexts GSources, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 08/25] aio: add non-blocking variant of aio_wait, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 06/25] aio: add I/O handlers to the AioContext interface, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 02/25] event_notifier: enable it to use pipes, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 09/25] aio: prepare for introducing GSource-based dispatch, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 12/25] aio: add aio_notify, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 15/25] main-loop: use aio_notify for qemu_notify_event, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 17/25] linux-aio: use event notifiers, Paolo Bonzini, 2012/10/26
- [Qemu-devel] [PATCH 18/25] qemu-thread: add QemuSemaphore, Paolo Bonzini, 2012/10/26