]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: lrw - Only add ecb if it is not already there
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 15 May 2025 08:28:08 +0000 (16:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:06 +0000 (11:07 +0100)
commite55d2885a5e23759a91dc2dc052270a64d3f052a
tree645f32d9f0d3775f43cd2732e4520fbe643c217b
parent60453e8d9f1c2636c68fc193365266aa1b245930
crypto: lrw - Only add ecb if it is not already there

[ Upstream commit 3d73909bddc2ebb3224a8bc2e5ce00e9df70c15d ]

Only add ecb to the cipher name if it isn't already ecb.

Also use memcmp instead of strncmp since these strings are all
stored in an array of length CRYPTO_MAX_ALG_NAME.

Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher")
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202505151503.d8a6cf10-lkp@intel.com
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
crypto/lrw.c