Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1351628ybj; Thu, 7 May 2020 22:29:32 -0700 (PDT) X-Google-Smtp-Source: APiQypKP7MKKYA40FUyg8Vkj5I9/ZtblPLlZwiN4yuVlHSs0XnMaJnI3kYwIrzUclJ/6iFQnJbIH X-Received: by 2002:a17:906:779a:: with SMTP id s26mr427161ejm.164.1588915772092; Thu, 07 May 2020 22:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588915772; cv=none; d=google.com; s=arc-20160816; b=u8nCsfBwzafZdRnfagDR0f9vRk1hr23ISK7fEVocAXNu6U8hsHsfBia5Lpu2VLrK/S u5bV7RMISd6vX/IUreHP415gQ8Gyn1z++EgAWxWzE+fJxzwNZHexcS88/fQjG7B0RVQH 9wRdOfrwyqWvEOIgICQJCJWvloLj41INT/YT2MpKwbIFQu+vxmir+nz/fnopMZk/c3oW xtr8M9HPOUWS8TtSVqra4j+wz3r+ABBFLtWgUO22cq7wtggIaGHI0orkRZjDW7IeMq8C zkQ8L9IJzuCNUGvrRUMzCM8k2STQWGSNwKbQNBVdPHwdoOeKLHtZCwXRWCJcniHZ5weW qGiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jgXEH2RG1EUF/osFI6e00b26mIaF+BkthMPU4Amf75U=; b=0LMnav76/PECSkw955DgIO3wkL+JAJ1DCC04e9pM0T3lUaqs4GwEq2VSgG9O28dosn Bu+aFgOxqXXRqnlPXd0JkXrhKdvq0Ax2/GYJj0xICFKssqY3h2lLMXxO/tsW1siBV+V2 6sC/Z+4LdITGQPXvOIs8AjfcYQCYojrzsEFUmt3+NlolCbTubk/VdrSuPhmjtv9WUuvy 9aFvawq8SlApovHwFJJFMuKkPam132t/o2tQsiROgZR5rehs4uIsdO/Pm4htSDLtsggv gazKF8UAdofoHYp6Er2cLI1yOADUM6LtbuzYTQyWczFJ0ALxxVLFscGxQk0dxofHNBzZ adug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aQxYapeY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si328297ejj.129.2020.05.07.22.29.09; Thu, 07 May 2020 22:29:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aQxYapeY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726009AbgEHF0g (ORCPT + 99 others); Fri, 8 May 2020 01:26:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbgEHF0g (ORCPT ); Fri, 8 May 2020 01:26:36 -0400 Received: from mail-vs1-xe42.google.com (mail-vs1-xe42.google.com [IPv6:2607:f8b0:4864:20::e42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C71C3C05BD09 for ; Thu, 7 May 2020 22:26:35 -0700 (PDT) Received: by mail-vs1-xe42.google.com with SMTP id e10so359416vsp.12 for ; Thu, 07 May 2020 22:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jgXEH2RG1EUF/osFI6e00b26mIaF+BkthMPU4Amf75U=; b=aQxYapeY3RhEj3QL+T0cTy4xQcneFUuBAt8xTEY2IXRwEOOVRYsKFr1vFpbknIr7TQ Dt6Sg0Y7pSFJBAiB17pgomIr28oE2tVknu4W9Kv7SKPx0Su1+iO83SgeJib8yog72aod CYvnQHz6m0I97taYXOmH/9t8sac2Mj9xpoRaiRC7Urd2KbpcB6xMFeq4JWglybksHYae 0suCF36vSePFEYyetLKwBK08CUFHmo/nPc8dhhqiCEotWsV4V70GtePv6YmEp6G/d/E0 hk2LE8bxRcbIcDeUCNSa0nnVBqLEDSenIS60AyrCG2rp0clckoQmFtpu/VhJKE7OD5HT 5wVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jgXEH2RG1EUF/osFI6e00b26mIaF+BkthMPU4Amf75U=; b=Wh2P4pNhp3jPzjw88zJnhEhQnJr0HmIsgfcChMnPBw9dFT5YTrP8dRmJBSYFrozt1J 4fjzIvj/DR6q4qb/esC26QxHxAqRUsVVR8MCsCuHAJc/pf6f5IqtDajd/AYM8DfH6Lli prUn5qWS3lz0bzIOoiBSGOwcOhkk5pindbSciH9IpHDc5nxQNAtPO3cFspeZT1vn/c1y H2qoYDRNJULzk1xmFtgGrPORAkNQb29j9QF3fl7MeHYJMe0JeuFuwYtpTgVqbwTIDM2r 4ry0MfdGn8ZVve8M1cNYFLdluM9fN7dt7I0EXMKnZNlO42yru7bb29X9j6FXEUaV9qmV kFAA== X-Gm-Message-State: AGi0PubTD7fKdBnC7ZiMuClTy8zSLLPQlSP97Bs3mUwY8rsxKdFsskCm i6f/QENF5DjA/T1nYxVlmO1fZg9WL/yrBULKVkmZLUDe X-Received: by 2002:a67:8b46:: with SMTP id n67mr567817vsd.35.1588915594812; Thu, 07 May 2020 22:26:34 -0700 (PDT) MIME-Version: 1.0 References: <1588775643-18037-1-git-send-email-vbadigan@codeaurora.org> <1588775643-18037-3-git-send-email-vbadigan@codeaurora.org> <66747f4c-e61f-509f-a3cc-7e3499a844e4@intel.com> In-Reply-To: <66747f4c-e61f-509f-a3cc-7e3499a844e4@intel.com> From: Ulf Hansson Date: Fri, 8 May 2020 07:25:58 +0200 Message-ID: Subject: Re: [PATCH] mmc: block: Fix request completion in the CQE timeout path To: Adrian Hunter Cc: Veerabhadrarao Badiganti , Sahitya Tummala , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , linux-arm-msm , Sarthak Garg , "# 4.0+" , Baolin Wang , Yoshihiro Shimoda , Thomas Gleixner , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 7 May 2020 at 16:06, Adrian Hunter wrote: > > First, it should be noted that the CQE timeout (60 seconds) is substantial > so a CQE request that times out is really stuck, and the race between > timeout and completion is extremely unlikely. Nevertheless this patch > fixes an issue with it. > > Commit ad73d6feadbd7b ("mmc: complete requests from ->timeout") > preserved the existing functionality, to complete the request. > However that had only been necessary because the block layer > timeout handler had been marking the request to prevent it from being > completed normally. That restriction was removed at the same time, the > result being that a request that has gone will have been completed anyway. > That is, the completion in the timeout handler became unnecessary. > > At the time, the unnecessary completion was harmless because the block > layer would ignore it, although that changed in kernel v5.0. > > Note for stable, this patch will not apply cleanly without patch "mmc: > core: Fix recursive locking issue in CQE recovery path" > > Signed-off-by: Adrian Hunter > Fixes: ad73d6feadbd7b ("mmc: complete requests from ->timeout") > Cc: stable@vger.kernel.org > --- > > > This is the patch I alluded to when replying to "mmc: core: Fix recursive > locking issue in CQE recovery path" Looks like the patch got corrupted, I was trying to fix it, but just couldn't figure it out. Can you please re-format and do a repost? Kind regards Uffe > > > drivers/mmc/core/queue.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c > index 72bef39d7011..10ea67892b5f 100644 > --- a/drivers/mmc/core/queue.c > +++ b/drivers/mmc/core/queue.c > @@ -110,8 +110,7 @@ static enum blk_eh_timer_return mmc_cqe_timed_out(struct > request *req) > mmc_cqe_recovery_notifier(mrq); > return BLK_EH_RESET_TIMER; > } > - /* No timeout (XXX: huh? comment doesn't make much sense) */ > - blk_mq_complete_request(req); > + /* The request has gone already */ > return BLK_EH_DONE; > default: > /* Timeout is handled by mmc core */ > -- > 2.17.1 >