Skip to content

Commit 38ce157

Browse files
shifteekeithbusch
authored andcommitted
nvme-auth: set explanation code for failure2 msgs
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 <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 616add7 commit 38ce157

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/nvme/host/auth.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,8 @@ static void nvme_queue_auth_work(struct work_struct *work)
838838
}
839839

840840
fail2:
841+
if (chap->status == 0)
842+
chap->status = NVME_AUTH_DHCHAP_FAILURE_FAILED;
841843
dev_dbg(ctrl->device, "%s: qid %d send failure2, status %x\n",
842844
__func__, chap->qid, chap->status);
843845
tl = nvme_auth_set_dhchap_failure2_data(ctrl, chap);

0 commit comments

Comments
 (0)