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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 2E5A9C47247 for ; Fri, 8 May 2020 05:26:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F1C420CC7 for ; Fri, 8 May 2020 05:26:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aQxYapeY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbgEHF0g (ORCPT ); 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-Google-Smtp-Source: APiQypIrnxR8E4rtJEWtj/6ZH8t5DZDcf7RygyXFGfVM1Io8rU8yL+5jnboGDWJNeT0QTfXFiWaC/4h8RJ4VKlAz4Go= 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 >