mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
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: 64929fe8c0 ("crypto: acomp - Remove request chaining")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user