Message ID | 20200601174031.830103680@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=Ycwd=7O=vger.kernel.org=stable-owner@kernel.org> 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=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 DA8F4C433DF for <stable@archiver.kernel.org>; Mon, 1 Jun 2020 18:51:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B95CF207DA for <stable@archiver.kernel.org>; Mon, 1 Jun 2020 18:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591037479; bh=IksiygbT99GRCqa8/aa3+JnLZ2faE/tp8hNH6jKo0dg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Y7SR39SF/CHwz80HU1lzLZUB0VvABoWtL8aXkzDPiHUQY3bL1tiXz4r33EOxLni9X ZalmCivvOtRIdOUFD2uvdIVzukGbLb7dbKpHKzGZdaVUe3qalhWp0xNolWJL5LAB02 1fZ6fep5bX+Y0nlIFtL1k+lIhtkL0GTRLGNTBmKg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729779AbgFASFG (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 1 Jun 2020 14:05:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:50084 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730294AbgFASFF (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 1 Jun 2020 14:05:05 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A27D22074B; Mon, 1 Jun 2020 18:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591034705; bh=IksiygbT99GRCqa8/aa3+JnLZ2faE/tp8hNH6jKo0dg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tYv2xgnbPnb74bt3a4+Rvsl/KkLe3tyny1G16kvqxCYHM39EUYskfHNT+aZkuAbD4 VWT4K9cm1fHveftsYuIe29SxpJEM0e25c+h90ld7nWwua+ga7XHIzJFSUBu0gHTN2y OHXjdogUOZUolg2s7uxPBaiEFVSh4y84XYvIXuA4= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Sahitya Tummala <stummala@codeaurora.org>, Sarthak Garg <sartgarg@codeaurora.org>, Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulf.hansson@linaro.org> Subject: [PATCH 4.19 70/95] mmc: core: Fix recursive locking issue in CQE recovery path Date: Mon, 1 Jun 2020 19:54:10 +0200 Message-Id: <20200601174031.830103680@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174020.759151073@linuxfoundation.org> References: <20200601174020.759151073@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/mmc/core/queue.c +++ b/drivers/mmc/core/queue.c @@ -108,7 +108,7 @@ static enum blk_eh_timer_return mmc_cqe_ case MMC_ISSUE_DCMD: if (host->cqe_ops->cqe_timeout(host, mrq, &recovery_needed)) { if (recovery_needed) - __mmc_cqe_recovery_notifier(mq); + mmc_cqe_recovery_notifier(mrq); return BLK_EH_RESET_TIMER; } /* The request has gone already */ @@ -125,18 +125,13 @@ static enum blk_eh_timer_return mmc_mq_t struct request_queue *q = req->q; struct mmc_queue *mq = q->queuedata; unsigned long flags; - int ret; + bool ignore_tout; spin_lock_irqsave(q->queue_lock, flags); - - if (mq->recovery_needed || !mq->use_cqe) - ret = BLK_EH_RESET_TIMER; - else - ret = mmc_cqe_timed_out(req); - + ignore_tout = mq->recovery_needed || !mq->use_cqe; spin_unlock_irqrestore(q->queue_lock, flags); - return ret; + return ignore_tout ? BLK_EH_RESET_TIMER : mmc_cqe_timed_out(req); } static void mmc_mq_recovery_handler(struct work_struct *work)