]> git.dujemihanovic.xyz Git - linux.git/commitdiff
nvmet-auth: replace pr_debug() with pr_err() to report an error.
authorMaurizio Lombardi <mlombard@redhat.com>
Wed, 10 Apr 2024 09:48:42 +0000 (11:48 +0200)
committerKeith Busch <kbusch@kernel.org>
Wed, 1 May 2024 09:58:42 +0000 (02:58 -0700)
In nvmet_auth_host_hash(), if a mismatch is detected in the hash length
the kernel should print an error.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/auth.c

index 9e51c064b0728792dbd2328ce49a65972ef759d9..fb518b00f71f6034a74be5746fc30b5bb090b972 100644 (file)
@@ -285,9 +285,9 @@ int nvmet_auth_host_hash(struct nvmet_req *req, u8 *response,
        }
 
        if (shash_len != crypto_shash_digestsize(shash_tfm)) {
-               pr_debug("%s: hash len mismatch (len %d digest %d)\n",
-                        __func__, shash_len,
-                        crypto_shash_digestsize(shash_tfm));
+               pr_err("%s: hash len mismatch (len %d digest %d)\n",
+                       __func__, shash_len,
+                       crypto_shash_digestsize(shash_tfm));
                ret = -EINVAL;
                goto out_free_tfm;
        }