Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3713293pxv; Mon, 26 Jul 2021 10:02:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhQNKwwVy1/ptQ8bVuGj4etTf8z4B5FSkV6N7Q4hCWKkor4/Ltt7HSmDBYGoKPzAkt23cW X-Received: by 2002:a17:906:6d45:: with SMTP id a5mr18168530ejt.299.1627318961850; Mon, 26 Jul 2021 10:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627318961; cv=none; d=google.com; s=arc-20160816; b=vMCilyUCTQqVE45FV8Ia9zvi+0pNqiK3H9TJW+EfQksWnG1Ppc1owG0/xwi9M5wd9d u9RVgfQJNbH0HTX/WS+FKD6D2tGIZCe/9wGXXZNxjFy7kxn6l6c4FTncnNkU24FTgs3e ACOFoAjODg1MMaU+dML0UkQQuL7tLCNtKpLKnaUYUyZ35fr4gt9j1XLI6VBu9sL4ddPv nIQRkeJ4znm99xmqs5pF5tezFlK2ErxxInbadb+1BAcvHLcDfjF4HbOf216zqfy3yr7b etzGe7SgLOSmLh488oL7yeViRozAxLHpKFVa3UtW1iEczwQnk3Ny+XMgpZ9QRnfDF6jM GvOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8zA6AG3UMHg1JJd5uGyA+buirq7kVbxfGC55uEpCd9g=; b=R5s7YktCK36Rths74MJ/wKRyn1FpBZAni69lF7ycKwVlzmTTzneCQuCGEQJbXHpC/c FX1z5VEFTy1uzEq+KoNCs95hVfvh4kO1kBo9MFr4naGRG1DgA2M6KtqGqOnNx2vTJCv8 pJkuzxW0PclDi5j426UT7PbMJ/SYhoxDs6L5Ef+t6jGJKo1Yn7OTJVxDA1EvPuQ/rCWp TaGSNLsNISp8SNuHNEw1uyStIwW8mzQyEaaQWXmClm9sPE1CrNpWNuCWKT3qgOpRQ/IA iC8sL2G3JM8RPtw8y11IuPqFXoF4cdCo7+ZpV6rZcox3e7BkWilQ32ouzs/ObVOh9ntQ 31Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UOsU7Os2; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v22si542840edb.487.2021.07.26.10.02.12; Mon, 26 Jul 2021 10:02:41 -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=@linuxfoundation.org header.s=korg header.b=UOsU7Os2; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234505AbhGZPgc (ORCPT + 99 others); Mon, 26 Jul 2021 11:36:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:34956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237101AbhGZPVC (ORCPT ); Mon, 26 Jul 2021 11:21:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B849A60FC3; Mon, 26 Jul 2021 16:01:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627315290; bh=85zcK2fJdEacMwM8BaE4a9JBSw7oZatQr/tKw1DffUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UOsU7Os2b++FeIZ3hQQne/5ZUyhp790PXWbA5G2sa+suuZwT9aoX2hsoGwCjVcV+H s1s1Dn3vXhJ72wKi1VDasozWd/huTZ0HnwXzwRSGCjoVh5ZDxAWJhvKJRRrWlaCHWX XBUnMVmzIbwUxNoQuGO8HayTJ5ta0K31UVAvfbG8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Casey Chen , Keith Busch , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.10 031/167] nvme-pci: do not call nvme_dev_remove_admin from nvme_remove Date: Mon, 26 Jul 2021 17:37:44 +0200 Message-Id: <20210726153840.429826840@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153839.371771838@linuxfoundation.org> References: <20210726153839.371771838@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Casey Chen [ Upstream commit 251ef6f71be2adfd09546a26643426fe62585173 ] nvme_dev_remove_admin could free dev->admin_q and the admin_tagset while they are being accessed by nvme_dev_disable(), which can be called by nvme_reset_work via nvme_remove_dead_ctrl. Commit cb4bfda62afa ("nvme-pci: fix hot removal during error handling") intended to avoid requests being stuck on a removed controller by killing the admin queue. But the later fix c8e9e9b7646e ("nvme-pci: unquiesce admin queue on shutdown"), together with nvme_dev_disable(dev, true) right before nvme_dev_remove_admin() could help dispatch requests and fail them early, so we don't need nvme_dev_remove_admin() any more. Fixes: cb4bfda62afa ("nvme-pci: fix hot removal during error handling") Signed-off-by: Casey Chen Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- drivers/nvme/host/pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 3f05df98697d..80e1d45b0668 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3003,7 +3003,6 @@ static void nvme_remove(struct pci_dev *pdev) if (!pci_device_is_present(pdev)) { nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DEAD); nvme_dev_disable(dev, true); - nvme_dev_remove_admin(dev); } flush_work(&dev->ctrl.reset_work); -- 2.30.2