Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp839383lqe; Sun, 7 Apr 2024 06:25:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXFv3NfmWPiwOQ/2f/pVBciUXWD0qmZVQMt30LCH6RZ4lJpTHHYToWEn1SMfOYvb5jDly6AAGjtgAwCeeYpwmhfUNkJO412DGdYAXZ3xQ== X-Google-Smtp-Source: AGHT+IG59rrKKAynsKCn6gT9wSAqy56TGYrAKta+rD+4J56VSekLSp7VCgaWOfRM4cRlfUthuhHe X-Received: by 2002:a54:4082:0:b0:3c5:f587:3068 with SMTP id i2-20020a544082000000b003c5f5873068mr52746oii.3.1712496309418; Sun, 07 Apr 2024 06:25:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712496309; cv=pass; d=google.com; s=arc-20160816; b=KygU7a387bNuR3h2w8kVDH4rsPHyRrdm0EnKnuUf5xuUU/U1UF1fKAUrmj5UStHjzx rPDhLiyDu/5wSBXv0mI3Y8spyKqgjffuudD+bG4TLEEKrNaSFiBDChfpxd6fc7DlmiII k1UDacMiBxXSI2SHKA1vzcW1AniVTz/vKsCzCriVM8/iUtVTiIdffU9Wmd/QNFHm1Isn /hBttjfceS8VW8Kv6BoPG5Mj28Q5BqZvEzLbe0tqCviykoRgaCdZ62zZg8HYV4ktRecT QCF05ixE/yVcxS39d7BWA3KR937GuEN3UShQLu+iWUL9co7dn6XhnGkmdK8ddn8FQUUx Bvwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=qg7jzPk+L8dzTIL7mso7l+VhXslv7/RrfRyNPkAD8jY=; fh=oPkVWPhE12BMK+pwlJxHuiMmWHHXnalyKV7QdFfBV30=; b=iNlApWURXwofaI/39TI2DNXHezIC2/3nO82GscaRGe3zjMJnTPw7xzvXCvsfeRw0O1 SfQpbUtcOpDRHtXvPdPjc3LowPWTEc6ybMkEkrZjUIrND3kVeyz+dQqFWV+iUJZeuJoY 7s+APaVk14Y+AXIAAg21tGV4XGKuHRcrz2rI3RPMhj0c30A1fJBifQIeAwnKwYzSabzP aHMyPnrpgCGjxmuftD19+ZcyhNO19HeFgYmReJDa81Sj1N05AYWrlbJgQ4XbQGDqdsVs TJfVelWmq77TBdU5BC1sErLJGiOqy63H1oxV5xBryBKYYAuAyNzX3eXfCBeDSIgPqwXz vPbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lM1eiqSk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-134440-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134440-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o9-20020a05622a138900b00434665d8bb6si4877508qtk.328.2024.04.07.06.25.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 06:25:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134440-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lM1eiqSk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-134440-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134440-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2426E1C2074B for ; Sun, 7 Apr 2024 13:25:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60B127D3FA; Sun, 7 Apr 2024 13:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lM1eiqSk" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 832897D08D; Sun, 7 Apr 2024 13:12:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712495559; cv=none; b=HUEpkDbJrynDrpwx/8hiWDNJnez0xNhSAJU/HDf1wee/+b2gG6QxWOckEUHzXRLKxTtMgCwt3WvBftyvw3Py8be2os5+xnlYji/qdNEgsBzxmb66QDgQ/ns4cEuWqQ7mpIJmXp1Xov9EXJC8YWzvqJ9utZPGZQhMJXcEymlzJ+o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712495559; c=relaxed/simple; bh=NFEolUfxk0K/xj5e0W1r3o6ohopS9Qkjrz7tlWs3TAw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=diCjdQbQi/RuJmMsrPW0kP6liKz9r6oOpelAXiTw292LPqrCbyvAZARvsPbgihH+Y/25E/sk7K5BN6RP8A4cxV+koQm3bnXjnRaLSaM5R26EOI/UREyMelwJkvQN9G5yanv69zgoS5K+pmY+/bzFC6M7D4msGwUzNkss6fsCVRw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lM1eiqSk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 190EEC433F1; Sun, 7 Apr 2024 13:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712495559; bh=NFEolUfxk0K/xj5e0W1r3o6ohopS9Qkjrz7tlWs3TAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lM1eiqSkCtbVnZXif0Wv3ccy2sVIcbNek2GI/BQZcmiGsZmU1SbJu5MYzD2F2SlmV qFRMAG9wRAo1Net4ds2oqtJtowU/BT3Pk5ndbZNJM52P/6AxrqCypczTMRfl2f99rf z7WbS8j9jLCWISVWxseVbV/GNihk8IIcEtPdnzid/12XDDwK/ga8qFhyAM2C9AeLrH 8MYlmU61gtQwctfnB3qf7YHcU+aen00o4jWXw8Yq9YSyUJXZ/gD7z9dwxN1O+1wHWp Ixkvt51dKUuQawQUPikYW0Qoe+41kTkoe056Joe4uEqD7Tm+o7/EREqTQT7NTSgO9H AD8nJdqZjnecQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Justin Tee , "Martin K . Petersen" , Sasha Levin , james.smart@broadcom.com, dick.kennedy@broadcom.com, jejb@linux.ibm.com, linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 6.6 05/22] scsi: lpfc: Replace hbalock with ndlp lock in lpfc_nvme_unregister_port() Date: Sun, 7 Apr 2024 09:12:04 -0400 Message-ID: <20240407131231.1051652-5-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240407131231.1051652-1-sashal@kernel.org> References: <20240407131231.1051652-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.25 Content-Transfer-Encoding: 8bit From: Justin Tee [ Upstream commit d11272be497e48a8e8f980470eb6b70e92eed0ce ] The ndlp object update in lpfc_nvme_unregister_port() should be protected by the ndlp lock rather than hbalock. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20240305200503.57317-6-justintee8345@gmail.com Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 96e11a26c297e..a7479258e8055 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -2614,9 +2614,9 @@ lpfc_nvme_unregister_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) /* No concern about the role change on the nvme remoteport. * The transport will update it. */ - spin_lock_irq(&vport->phba->hbalock); + spin_lock_irq(&ndlp->lock); ndlp->fc4_xpt_flags |= NVME_XPT_UNREG_WAIT; - spin_unlock_irq(&vport->phba->hbalock); + spin_unlock_irq(&ndlp->lock); /* Don't let the host nvme transport keep sending keep-alives * on this remoteport. Vport is unloading, no recovery. The -- 2.43.0