From patchwork Wed Nov 21 12:34:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard W.M. Jones" X-Patchwork-Id: 10692525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CEFE55A4 for ; Wed, 21 Nov 2018 12:42:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDB942BB73 for ; Wed, 21 Nov 2018 12:42:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1C662BB76; Wed, 21 Nov 2018 12:42:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 04CED2BB73 for ; Wed, 21 Nov 2018 12:42:01 +0000 (UTC) Received: from localhost ([::1]:38817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPRpR-0006b1-5N for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Nov 2018 07:42:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPRoQ-00066J-9j for qemu-devel@nongnu.org; Wed, 21 Nov 2018 07:40:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPRoK-0005iE-8w for qemu-devel@nongnu.org; Wed, 21 Nov 2018 07:40:56 -0500 Received: from indium.canonical.com ([91.189.90.7]:56560) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPRoK-0005h9-2d for qemu-devel@nongnu.org; Wed, 21 Nov 2018 07:40:52 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.86_2 #2 (Debian)) id 1gPRoH-0004op-Hg for ; Wed, 21 Nov 2018 12:40:49 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 83BF72E806B for ; Wed, 21 Nov 2018 12:40:49 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 21 Nov 2018 12:34:14 -0000 From: Richard Jones To: qemu-devel@nongnu.org X-Launchpad-Notification-Type: bug X-Launchpad-Bug: product=qemu; status=New; importance=Undecided; assignee=None; X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: rjones-redhat X-Launchpad-Bug-Reporter: Richard Jones (rjones-redhat) X-Launchpad-Bug-Modifier: Richard Jones (rjones-redhat) References: <154275217430.18542.5225566870592653176.malonedeb@gac.canonical.com> Message-Id: <154280365407.27000.3799049800925042503.malone@soybean.canonical.com> X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml X-Launchpad-Message-For: qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="18824"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: e25a6ad186c0ffff1303b671c6050a86646effc7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 91.189.90.7 Subject: [Qemu-devel] [Bug 1804323] Re: qemu segfaults in virtio-scsi driver if underlying device returns -EIO X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bug 1804323 <1804323@bugs.launchpad.net> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Kevin suggested this change, which works for me: diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 6eb258d3f3..0e9027c8f3 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -482,7 +482,7 @@ static bool scsi_handle_rw_error(SCSIDiskReq *r, int error, bool acct_failed) if (action == BLOCK_ERROR_ACTION_STOP) { scsi_req_retry(&r->req); } - return false; + return true; } static void scsi_write_complete_noio(SCSIDiskReq *r, int ret)