Received: from eggs.gnu.org ([2001:4830:134:3::10]:42730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWrkx-0004qx-PE for qemu-devel@nongnu.org; Mon, 08 Aug 2016 17:06:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWrkt-0006Jk-IY for qemu-devel@nongnu.org; Mon, 08 Aug 2016 17:06:42 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:27615 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWrkt-0006Jc-Br for qemu-devel@nongnu.org; Mon, 08 Aug 2016 17:06:39 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u78Kxk6m105409 for ; Mon, 8 Aug 2016 17:06:39 -0400 Received: from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159]) by mx0a-001b2d01.pphosted.com with ESMTP id 24nbs0rngw-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 08 Aug 2016 17:06:38 -0400 Received: from localhost by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 8 Aug 2016 15:06:38 -0600 From: Michael Roth Date: Mon, 8 Aug 2016 16:04:27 -0500 In-Reply-To: <1470690267-31454-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1470690267-31454-1-git-send-email-mdroth@linux.vnet.ibm.com> Message-Id: <1470690267-31454-57-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 56/56] ide: fix halted IO segfault at reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, John Snow From: John Snow If one attempts to perform a system_reset after a failed IO request that causes the VM to enter a paused state, QEMU will segfault trying to free up the pending IO requests. These requests have already been completed and freed, though, so all we need to do is NULL them before we enter the paused state. Existing AHCI tests verify that halted requests are still resumed successfully after a STOP event. Analyzed-by: Laszlo Ersek Reviewed-by: Laszlo Ersek Signed-off-by: John Snow Message-id: 1469635201-11918-2-git-send-email-jsnow@redhat.com Signed-off-by: John Snow (cherry picked from commit 87ac25fd1fed05a30a93d27dbeb2a4c4b83ec95f) Signed-off-by: Michael Roth --- hw/ide/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index 41e6a2d..e87dc57 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -806,6 +806,7 @@ static void ide_dma_cb(void *opaque, int ret) } if (ret < 0) { if (ide_handle_rw_error(s, -ret, ide_dma_cmd_to_retry(s->dma_cmd))) { + s->bus->dma->aiocb = NULL; return; } } -- 1.9.1