From: Herbert Xu Date: Fri, 18 Apr 2025 02:52:34 +0000 (+0800) Subject: crypto: acomp - Add missing return statements in compress/decompress X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=31b20bc22f6897a881059c0c85635966e0fd23a5;p=users%2Fdwmw2%2Flinux.git 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 Fixes: 64929fe8c0a4 ("crypto: acomp - Remove request chaining") Signed-off-by: Herbert Xu --- diff --git a/crypto/acompress.c b/crypto/acompress.c index b0f9192f6b2eb..4c665c6fb5d63 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);