[PATCH] nvmet-auth: print an error message if the auth timeout expires

Hannes Reinecke hare at suse.de
Wed Apr 24 06:11:51 PDT 2024


On 4/24/24 12:24, Maurizio Lombardi wrote:
> When the auth_expired_work fires, an error message should be printed
> to inform the user that the authentication is failing because of
> a timeout, so he doesn't get misleaded into thinking there is a bug
> in the auth code when seeing messages like the following:
> 
> nvmet: nvmet_execute_auth_send: ctrl 1 qid 2 step mismatch (2 != 0)
> nvmet: nvmet_execute_auth_send: failure incorrect message.
> 
> Signed-off-by: Maurizio Lombardi <mlombard at redhat.com>
> ---
>   drivers/nvme/target/fabrics-cmd-auth.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/target/fabrics-cmd-auth.c b/drivers/nvme/target/fabrics-cmd-auth.c
> index eb7785be0ca7..7436ebda9f70 100644
> --- a/drivers/nvme/target/fabrics-cmd-auth.c
> +++ b/drivers/nvme/target/fabrics-cmd-auth.c
> @@ -17,8 +17,8 @@ static void nvmet_auth_expired_work(struct work_struct *work)
>   	struct nvmet_sq *sq = container_of(to_delayed_work(work),
>   			struct nvmet_sq, auth_expired_work);
>   
> -	pr_debug("%s: ctrl %d qid %d transaction %u expired, resetting\n",
> -		 __func__, sq->ctrl->cntlid, sq->qid, sq->dhchap_tid);
> +	pr_err("%s: ctrl %d qid %d transaction %u expired, resetting\n",
> +		__func__, sq->ctrl->cntlid, sq->qid, sq->dhchap_tid);
>   	sq->dhchap_step = NVME_AUTH_DHCHAP_MESSAGE_NEGOTIATE;
>   	sq->dhchap_tid = -1;
>   }
Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare at suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich




More information about the Linux-nvme mailing list