From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDA04C43441 for ; Wed, 14 Nov 2018 18:03:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 94B6A21780 for ; Wed, 14 Nov 2018 18:03:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94B6A21780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-block-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728005AbeKOEH6 (ORCPT ); Wed, 14 Nov 2018 23:07:58 -0500 Received: from mga09.intel.com ([134.134.136.24]:52426 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727773AbeKOEH6 (ORCPT ); Wed, 14 Nov 2018 23:07:58 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2018 10:03:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,233,1539673200"; d="scan'208";a="108566943" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga002.jf.intel.com with ESMTP; 14 Nov 2018 10:03:44 -0800 Date: Wed, 14 Nov 2018 11:00:18 -0700 From: Keith Busch To: Bart Van Assche Cc: linux-scsi@vger.kernel.org, linux-block@vger.kernel.org, Jens Axboe Subject: Re: [PATCH 2/3] scsi: Do not rely on blk-mq for double completions Message-ID: <20181114180018.GC11416@localhost.localdomain> References: <20181114162601.11477-1-keith.busch@intel.com> <20181114162601.11477-2-keith.busch@intel.com> <1542217896.100259.2.camel@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1542217896.100259.2.camel@acm.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Wed, Nov 14, 2018 at 09:51:36AM -0800, Bart Van Assche wrote: > Regarding this patch: I think this patch introduces a subtle but severe bug > in the SCSI core, namely that if an abort is processed concurrently with > request completion with "fake timeout" enabled that the abort is ignored. That requires the following occur concurrently: 1. A real completion 2. A real timeout 3. A fake timeout That can't happen on a production kernel, and highly improbable on the fake one. We can still fix it by having scsi timeout return BLK_EH_RESET_TIMER in this case. I didn't like adding code just to work around error injection, but there isn't a good alternative at the moment.