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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 494C1EE14D8 for ; Wed, 11 Oct 2023 08:45:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345573AbjJKIpo (ORCPT ); Wed, 11 Oct 2023 04:45:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345681AbjJKIpc (ORCPT ); Wed, 11 Oct 2023 04:45:32 -0400 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9AE09C for ; Wed, 11 Oct 2023 01:45:29 -0700 (PDT) Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4D4DD240105 for ; Wed, 11 Oct 2023 10:45:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1697013927; bh=RGojVmI/xMEaWWuoMnRdbYay89Aw9vZzsbfx00TeLGM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding:From; b=K4elfQCEQPf7k0RYueBGzgvHZaYbvOE0BALBwsudmD8THiXL+irDXXj9xW/OtVQsG mszP5yfpC5FtxOQFFUzg/+2ijV0QqdiaE/3eYSAhSFy45jWWxFkRhi52TMmrCt15D8 eDgPbJp1Art/qzvdj+eWQ1e/eSHC56b+PY9HsCdfpWQsFrgsz673kIqwy+N2l/GSiC gBBK7t1GsG0PPyCywGwM60yDOpDCCGZ189dxA36WkvfBKhX4V5PLfJFEjAtJZtEQpl RytSj4ri6kESkMjypRLUVrx+1nR3Nh8FpC9JX73iQsfNHKc08adeepLlH4yFSRzaFo A0G7e3RqGv7GA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S55v9353sz6tw0; Wed, 11 Oct 2023 10:45:25 +0200 (CEST) From: Mark O'Donovan 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 Subject: [PATCH 1/2 RESEND] nvme-auth: unlock mutex in one place only Date: Wed, 11 Oct 2023 08:45:11 +0000 Message-Id: <20231011084512.1835614-1-shiftee@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Mark O'Donovan Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke --- drivers/nvme/host/auth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c index daf5d144a8ea..e1a98647c3a2 100644 --- a/drivers/nvme/host/auth.c +++ b/drivers/nvme/host/auth.c @@ -758,12 +758,11 @@ static void nvme_queue_auth_work(struct work_struct *work) __func__, chap->qid); mutex_lock(&ctrl->dhchap_auth_mutex); ret = nvme_auth_dhchap_setup_host_response(ctrl, chap); + mutex_unlock(&ctrl->dhchap_auth_mutex); if (ret) { - mutex_unlock(&ctrl->dhchap_auth_mutex); chap->error = ret; goto fail2; } - mutex_unlock(&ctrl->dhchap_auth_mutex); /* DH-HMAC-CHAP Step 3: send reply */ dev_dbg(ctrl->device, "%s: qid %d send reply\n", -- 2.39.2