Message ID | 20231011084512.1835614-2-shiftee@posteo.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp389424vqb; Wed, 11 Oct 2023 01:46:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFN3QmuR/Wze+ZWdBSw2+lEZPSetwvcxjNRmBbUVUd4XOM5/qC6fLcUgN1ydgcI0BrV9oLC X-Received: by 2002:a05:6a00:2e87:b0:690:c79c:1912 with SMTP id fd7-20020a056a002e8700b00690c79c1912mr22910960pfb.0.1697013974277; Wed, 11 Oct 2023 01:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697013974; cv=none; d=google.com; s=arc-20160816; b=k+L67Oa9GAg6EKxRQZYai5rGUavKIGheSWC9n8jnZYUGhwxBmeUeLux5GTvMcZEgJP bPIuemJTxI09dU3RVzRzvZjEjAC0MRkvlyhlIcAGn3IjhDZADSK5V47OdHc4q+dNuQ3r QLsEWyXEA6U2KGxQ+D45l/Mu38122yUZvTXeu87OwweXE7d1EmSP8UvAgkWXMvLp10kV Y8oiLTtX12czuDFh+3F+cwj2ANKuQPRgKNkwfZDHqvTn5MlPExk1qfShftWqrr31nAxM 6MxM1gsbtSFiAw6NxGPe1ZQJC4wBGGk/x9dk4eKW2QIPUsc6Iuo7NZzHWBkonElAYkLp U7iw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WWsp2lZYjNABdfJu4pN0mVKmqaG1Tm315z3OevtQvHU=; fh=nK/B2gIzvYPsKU0sJgdKEVdz5eoE00hHt727sEimwsQ=; b=XHmauicNaDYmkyuqAr8Lhh3NF+jaPrdBLIR89XB4xJLrFVriyDdKsWxGliwGDvNm1D N9VYZZPSaekP6AkARUMWTO0EG+sD6soei07VhqeF5FlWb3laEYw0R8fhulaM5TXar0w0 Jn3XdBa5NBiRjdsWLvieYcGiqj12jFjBRniTuU1SH2XkSvoPAc3XHhFewnSo44HStTfA eSYc1eakIZgx61aV+pQQKMkos1npUiQFc7bzXS84pd3+zNJNyOUXStd/0pmtoyxlDNyg Cf8LS1yBhBMlhqcC5j14h6q95lAFTm8ql/H3j1DLEYbDJwf8sASSkQ5svrclnO2LEa8+ 02qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b="fPB/cjVY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id fi35-20020a056a0039a300b006901504b68esi11944273pfb.166.2023.10.11.01.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 01:46:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b="fPB/cjVY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B589E80E0A27; Wed, 11 Oct 2023 01:46:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345615AbjJKIpq (ORCPT <rfc822;rua109.linux@gmail.com> + 19 others); Wed, 11 Oct 2023 04:45:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230496AbjJKIph (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Oct 2023 04:45:37 -0400 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07413B6 for <linux-kernel@vger.kernel.org>; Wed, 11 Oct 2023 01:45:35 -0700 (PDT) Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 77CBA24002A for <linux-kernel@vger.kernel.org>; Wed, 11 Oct 2023 10:45:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1697013934; bh=HoFGL1O1u5jeH2eaAc/NSgPYTeO+yRIjCCiIYzJbT6w=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding:From; b=fPB/cjVYgK9Fdfzt2+GmxUYKzlWxtsNpfGkoBdJ6va1ELOt/MEEsTHthx0gQpyMSo 3zPVMDIwaZEtIgVLdIrk58uwS+fijwmAVPtz+GVbwkLaZdGOIpk29OPBI6qPFTVYd3 TxBGn065nSqNGh9CH3RqMtRKWBzmxpQYZ95MOSZAQySq6vAfEzf70PorNtyG6KXonQ PDoGFhSQrTzN6b+H5yKQpKAHwdaUcNKProTXIZHetLMHaHZp6yQ4y0mQxbaQxH5c87 9sqhmlTKLqcIUa9Swp75a1Uoe4f1Hs2hiyV7G2XbxmbWXZkMP/hfW5ZvBO+zjU5eC+ MZaPwYHEsusbA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S55vK1M9Pz6tw0; Wed, 11 Oct 2023 10:45:33 +0200 (CEST) From: Mark O'Donovan <shiftee@posteo.net> To: linux-kernel@vger.kernel.org Cc: linux-nvme@lists.infradead.org, sagi@grimberg.me, hch@lst.de, axboe@kernel.dk, kbusch@kernel.org, hare@suse.de, Mark O'Donovan <shiftee@posteo.net> Subject: [PATCH 2/2 RESEND] nvme-auth: set explanation code for failure2 msgs Date: Wed, 11 Oct 2023 08:45:12 +0000 Message-Id: <20231011084512.1835614-2-shiftee@posteo.net> In-Reply-To: <20231011084512.1835614-1-shiftee@posteo.net> References: <20231011084512.1835614-1-shiftee@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 11 Oct 2023 01:46:10 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779448125198543676 X-GMAIL-MSGID: 1779448125198543676 |
Series |
[1/2,RESEND] nvme-auth: unlock mutex in one place only
|
|
Commit Message
Mark O'Donovan
Oct. 11, 2023, 8:45 a.m. UTC
Some error cases were not setting an auth-failure-reason-code-explanation. This means an AUTH_Failure2 message will be sent with an explanation value of 0 which is a reserved value. Signed-off-by: Mark O'Donovan <shiftee@posteo.net> Reviewed-by: Hannes Reinecke <hare@suse.de> --- v1->v2: Set failure explanation in a single place if the error handling code has not already done so. --- drivers/nvme/host/auth.c | 2 ++ 1 file changed, 2 insertions(+)
Comments
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c index e1a98647c3a2..9556cfc4f5f3 100644 --- a/drivers/nvme/host/auth.c +++ b/drivers/nvme/host/auth.c @@ -839,6 +839,8 @@ static void nvme_queue_auth_work(struct work_struct *work) } fail2: + if (chap->status == 0) + chap->status = NVME_AUTH_DHCHAP_FAILURE_FAILED; dev_dbg(ctrl->device, "%s: qid %d send failure2, status %x\n", __func__, chap->qid, chap->status); tl = nvme_auth_set_dhchap_failure2_data(ctrl, chap);