diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2025-04-18 10:52:34 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-04-19 11:18:28 +0800 |
commit | 31b20bc22f6897a881059c0c85635966e0fd23a5 (patch) | |
tree | a508dbf4dfcfa918cc9348b39e18515373609c2d | |
parent | da4cb617bc7d827946cbb368034940b379a1de90 (diff) |
crypto: acomp - Add missing return statements in compress/decompress
The return statements were missing which causes REQ_CHAIN algorithms
to execute twice for every request.
Reported-by: Eric Biggers <ebiggers@kernel.org>
Fixes: 64929fe8c0a4 ("crypto: acomp - Remove request chaining")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | crypto/acompress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/acompress.c b/crypto/acompress.c index b0f9192f6b2e..4c665c6fb5d6 100644 --- a/crypto/acompress.c +++ b/crypto/acompress.c @@ -292,7 +292,7 @@ int crypto_acomp_compress(struct acomp_req *req) if (acomp_req_on_stack(req) && acomp_is_async(tfm)) return -EAGAIN; if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req)) - crypto_acomp_reqtfm(req)->compress(req); + return crypto_acomp_reqtfm(req)->compress(req); return acomp_do_req_chain(req, true); } EXPORT_SYMBOL_GPL(crypto_acomp_compress); @@ -304,7 +304,7 @@ int crypto_acomp_decompress(struct acomp_req *req) if (acomp_req_on_stack(req) && acomp_is_async(tfm)) return -EAGAIN; if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req)) - crypto_acomp_reqtfm(req)->decompress(req); + return crypto_acomp_reqtfm(req)->decompress(req); return acomp_do_req_chain(req, false); } EXPORT_SYMBOL_GPL(crypto_acomp_decompress); |