Whamcloud - gitweb
LU-13344 libcfs: adler32: don't set CRYPTO_TFM_RES_BAD_KEY_LEN 70/37870/3
authorMr NeilBrown <neilb@suse.de>
Tue, 10 Mar 2020 20:34:41 +0000 (16:34 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 24 Mar 2020 05:21:11 +0000 (05:21 +0000)
This flag was not being checked by most callers and has been removed since
Commit 674f368a952c ("crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN")
so remove from lustre too.

Change-Id: Ia616430a98d05c7bb3b22a0be543e83855272d2f
Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/37870
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/linux-crypto-adler.c

index ee47fb5..5b21ef7 100644 (file)
@@ -51,10 +51,9 @@ static int adler32_setkey(struct crypto_shash *hash, const u8 *key,
 {
        u32 *mctx = crypto_shash_ctx(hash);
 
-       if (keylen != sizeof(u32)) {
-               crypto_shash_set_flags(hash, CRYPTO_TFM_RES_BAD_KEY_LEN);
+       if (keylen != sizeof(u32))
                return -EINVAL;
-       }
+
        *mctx = *(u32 *)key;
        return 0;
 }