From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRkbY-00069i-Sc for qemu-devel@nongnu.org; Fri, 26 Oct 2012 10:09:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRkbR-0005Y3-V4 for qemu-devel@nongnu.org; Fri, 26 Oct 2012 10:09:44 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:61615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRkbR-0005Sp-Om for qemu-devel@nongnu.org; Fri, 26 Oct 2012 10:09:37 -0400 Received: by mail-bk0-f45.google.com with SMTP id jf3so1090170bkc.4 for ; Fri, 26 Oct 2012 07:09:37 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 26 Oct 2012 16:05:37 +0200 Message-Id: <1351260355-19802-8-git-send-email-pbonzini@redhat.com> In-Reply-To: <1351260355-19802-1-git-send-email-pbonzini@redhat.com> References: <1351260355-19802-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 07/25] aio: test node->deleted before calling io_flush List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, stefanha@redhat.com Otherwise, there could be a case where io_flush accesses freed memory because it should not have been called. Signed-off-by: Paolo Bonzini --- 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