]> 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:05:10 +0000 (11:05 +0100)
commit200b752c00667b3859a99de745afde0a75984447
treea199563e5640809ad83fcdb32ae6d0d4e6951649
parent9bacddcf6886b54660e05779d8af8a91c0d35250
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