public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] nvme-auth: unlock mutex in one place only
@ 2023-07-27 13:47 Mark O'Donovan
  2023-07-27 13:47 ` [PATCH 2/2] nvme-auth: set explanation code for failure2 msgs Mark O'Donovan
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Mark O'Donovan @ 2023-07-27 13:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-nvme, sagi, hch, axboe, kbusch, hare, Mark O'Donovan

Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
---
 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



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-07-31 18:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27 13:47 [PATCH 1/2] nvme-auth: unlock mutex in one place only Mark O'Donovan
2023-07-27 13:47 ` [PATCH 2/2] nvme-auth: set explanation code for failure2 msgs Mark O'Donovan
2023-07-31  5:58   ` Christoph Hellwig
2023-07-31 16:17     ` Hannes Reinecke
2023-07-31  5:55 ` [PATCH 1/2] nvme-auth: unlock mutex in one place only Christoph Hellwig
2023-07-31 12:00 ` Markus Elfring
2023-07-31 13:51   ` Christoph Hellwig
2023-07-31 17:46     ` [1/2] " Markus Elfring
2023-07-31 18:18       ` Keith Busch
2023-07-31 18:37         ` Markus Elfring
2023-07-31 18:43           ` Keith Busch
2023-07-31 13:51 ` [PATCH 1/2] " Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox