diff options
author | 2025-05-10 18:43:33 +0800 | |
---|---|---|
committer | 2025-05-14 17:45:22 +0800 | |
commit | 1bafd82d9a40cf09c6c40f1c09cc35b7050b1a9f (patch) | |
tree | 3cdf1322647a68eda5394cd5b5b22c9d61a745ed | |
parent | crypto: marvell/cesa - Handle zero-length skcipher requests (diff) | |
download | linux-rng-1bafd82d9a40cf09c6c40f1c09cc35b7050b1a9f.tar.xz linux-rng-1bafd82d9a40cf09c6c40f1c09cc35b7050b1a9f.zip |
crypto: marvell/cesa - Avoid empty transfer descriptor
The user may set req->src even if req->nbytes == 0. If there
is no data to hash from req->src, do not generate an empty TDMA
descriptor.
Fixes: db509a45339f ("crypto: marvell/cesa - add TDMA support")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/marvell/cesa/hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/marvell/cesa/hash.c b/drivers/crypto/marvell/cesa/hash.c index f150861ceaf6..6815eddc9068 100644 --- a/drivers/crypto/marvell/cesa/hash.c +++ b/drivers/crypto/marvell/cesa/hash.c @@ -663,7 +663,7 @@ static int mv_cesa_ahash_dma_req_init(struct ahash_request *req) if (ret) goto err_free_tdma; - if (iter.src.sg) { + if (iter.base.len > iter.src.op_offset) { /* * Add all the new data, inserting an operation block and * launch command between each full SRAM block-worth of |