diff options
author | Eric Biggers <ebiggers@google.com> | 2019-12-31 04:19:35 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-01-09 04:30:52 +0100 |
commit | 5c925e8b10a5f43f220755aceb9d5f14b2f4e2c5 (patch) | |
tree | 4b076d771bb60303be9fbde31c0c17380c3a1ab3 /drivers/crypto/ccree/cc_aead.c | |
parent | crypto: remove unused tfm result flags (diff) | |
download | linux-5c925e8b10a5f43f220755aceb9d5f14b2f4e2c5.tar.xz linux-5c925e8b10a5f43f220755aceb9d5f14b2f4e2c5.zip |
crypto: remove CRYPTO_TFM_RES_BAD_BLOCK_LEN
The flag CRYPTO_TFM_RES_BAD_BLOCK_LEN is never checked for, and it's
only set by one driver. And even that single driver's use is wrong
because the driver is setting the flag from ->encrypt() and ->decrypt()
with no locking, which is unsafe because ->encrypt() and ->decrypt() can
be executed by many threads in parallel on the same tfm.
Just remove this flag.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccree/cc_aead.c')
-rw-r--r-- | drivers/crypto/ccree/cc_aead.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/crypto/ccree/cc_aead.c b/drivers/crypto/ccree/cc_aead.c index 64d318dc0d47..b0085db7e211 100644 --- a/drivers/crypto/ccree/cc_aead.c +++ b/drivers/crypto/ccree/cc_aead.c @@ -1925,7 +1925,6 @@ static int cc_proc_aead(struct aead_request *req, if (validate_data_size(ctx, direct, req)) { dev_err(dev, "Unsupported crypt/assoc len %d/%d.\n", req->cryptlen, areq_ctx->assoclen); - crypto_aead_set_flags(tfm, CRYPTO_TFM_RES_BAD_BLOCK_LEN); return -EINVAL; } |