From 31b20bc22f6897a881059c0c85635966e0fd23a5 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Fri, 18 Apr 2025 10:52:34 +0800 Subject: [PATCH] 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 --- crypto/acompress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.50.1