From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQNQ8-0007dg-EA for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:53:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQNPu-0007Ni-FU for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:53:36 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:34771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQNPu-0007NQ-8N for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:53:22 -0500 Received: from /spool/local by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Feb 2015 14:53:21 -0700 From: Michael Roth Date: Tue, 24 Feb 2015 15:48:05 -0600 Message-Id: <1424814498-6993-31-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1424814498-6993-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1424814498-6993-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 30/43] scsi: fix cancellation when I/O was completed but DMA was not. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-stable@nongnu.org From: Paolo Bonzini Commit d577646 (scsi: Introduce scsi_req_cancel_complete, 2014-09-25) was supposed to have no semantic change, but it missed a case. When r->aiocb has already been NULLed, but DMA was not complete and the SCSI layer was waiting for scsi_req_continue, after the patch the SCSI layer will not call the .cancel callback of SCSIBusInfo. Fixes: d5776465ee9a55815792efa34d79de240f4ffd99 Cc: qemu-stable@nongnu.org Reported-by: Dr. David Alan Gilbert Tested-by: Dr. David Alan Gilbert Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini (cherry picked from commit 488eef2f1d16c97cf7f9ebf644ecafa1ea1e9acc) Signed-off-by: Michael Roth --- hw/scsi/scsi-bus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 24f7b74..9b740a3 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -1770,6 +1770,8 @@ void scsi_req_cancel(SCSIRequest *req) req->io_canceled = true; if (req->aiocb) { blk_aio_cancel(req->aiocb); + } else { + scsi_req_cancel_complete(req); } } -- 1.9.1