nvmet-auth: fix some minor bugs
Subsystems (3)
cover nvmet-auth: fix some minor bugs
First patch modifies nvmet_auth_host_hash() so it correctly returns the error code to its caller.
The second patch replaces a pr_debug() with pr_err().
Maurizio Lombardi (2):
nvmet-auth: return the error code to the nvmet_auth_host_hash()
callers
nvmet-auth: replace pr_debug() with pr_err() to report an error.
drivers/nvme/target/auth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.39.3
PATCH 1/2 nvmet-auth: return the error code to the nvmet_auth_host_hash() callers
If the nvmet_auth_host_hash() function fails, the error code should be returned to its callers.
--- drivers/nvme/target/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/auth.c +1 -1
@@ -370,7 +370,7 @@ int nvmet_auth_host_hash(struct nvmet_req *req, u8 *response,nvme_auth_free_key (transformed_key); out_free_tfm:crypto_free_shash (shash_tfm); -return 0 ; +return ret; } int nvmet_auth_ctrl_hash(struct nvmet_req *req, u8 *response,
Signature · 1 line
2.39.3
Re: [PATCH 1/2] nvmet-auth: return the error code to the nvmet_auth_host_hash() callers
Re: [PATCH 1/2] nvmet-auth: return the error code to the nvmet_auth_host_hash() callers
In reply to Maurizio LombardiQuoted 5 lines · Maurizio Lombardi
If the
nvmet_auth_host_hash()function fails, the error code should be returned to its callers.Signed-off-by Maurizio Lombardi<[email protected]>---
Looks good.
-ck
PATCH 2/2 nvmet-auth: replace pr_debug() with pr_err() to report an error.
In reply to Maurizio LombardiIn nvmet_auth_host_hash(), if a mismatch is detected in the hash length the kernel should print an error.
--- drivers/nvme/target/auth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/nvme/target/auth.c +3 -3
@@ -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; }
Signature · 1 line
2.39.3
Re: [PATCH 2/2] nvmet-auth: replace pr_debug() with pr_err() to report an error.
Re: [PATCH 2/2] nvmet-auth: replace pr_debug() with pr_err() to report an error.
In reply to Maurizio LombardiQuoted 7 lines · Maurizio Lombardi
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<[email protected]>--- drivers/nvme/target/auth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Looks good.
-ck
Quoted 4 lines · Maurizio Lombardi
First patch modifies
nvmet_auth_host_hash()so it correctly returns the error code to its caller.The second patch replaces a
pr_debug()withpr_err().
Thanks, applied to nvme-6.9.