From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnAKZ-00088z-Kz for qemu-devel@nongnu.org; Thu, 22 Sep 2016 16:10:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnAKY-0003JV-9S for qemu-devel@nongnu.org; Thu, 22 Sep 2016 16:10:51 -0400 From: John Snow Date: Thu, 22 Sep 2016 16:10:40 -0400 Message-Id: <1474575040-32079-2-git-send-email-jsnow@redhat.com> In-Reply-To: <1474575040-32079-1-git-send-email-jsnow@redhat.com> References: <1474575040-32079-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH 1/1] ahci: clear aiocb in ncq_cb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-stable@nongnu.org, qemu-devel@nongnu.org, John Snow Similar to existing fixes for IDE and ATAPI, the AIOCB must be cleared in the callback. Otherwise, we may accidentally try to reset it after the object has been released. Signed-off-by: John Snow --- hw/ide/ahci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index f3438ad..63ead21 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -948,6 +948,7 @@ static void ncq_cb(void *opaque, int ret) NCQTransferState *ncq_tfs = (NCQTransferState *)opaque; IDEState *ide_state = &ncq_tfs->drive->port.ifs[0]; + ncq_tfs->aiocb = NULL; if (ret == -ECANCELED) { return; } -- 2.7.4