Commit c7390f13 authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Christoph Hellwig

nvme-auth: don't re-authenticate if the controller is not LIVE

The connect sequence will re-authenticate.
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 100b555b
...@@ -939,6 +939,13 @@ static void nvme_ctrl_auth_work(struct work_struct *work) ...@@ -939,6 +939,13 @@ static void nvme_ctrl_auth_work(struct work_struct *work)
container_of(work, struct nvme_ctrl, dhchap_auth_work); container_of(work, struct nvme_ctrl, dhchap_auth_work);
int ret, q; int ret, q;
/*
* If the ctrl is no connected, bail as reconnect will handle
* authentication.
*/
if (ctrl->state != NVME_CTRL_LIVE)
return;
/* Authenticate admin queue first */ /* Authenticate admin queue first */
ret = nvme_auth_negotiate(ctrl, 0); ret = nvme_auth_negotiate(ctrl, 0);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment