android_kernel_samsung_univ.../include/crypto
Herbert Xu 2673d1c512 crypto: ahash - Fix EINPROGRESS notification callback
commit ef0579b64e93188710d48667cb5e014926af9f1b upstream.

The ahash API modifies the request's callback function in order
to clean up after itself in some corner cases (unaligned final
and missing finup).

When the request is complete ahash will restore the original
callback and everything is fine.  However, when the request gets
an EBUSY on a full queue, an EINPROGRESS callback is made while
the request is still ongoing.

In this case the ahash API will incorrectly call its own callback.

This patch fixes the problem by creating a temporary request
object on the stack which is used to relay EINPROGRESS back to
the original completion function.

This patch also adds code to preserve the original flags value.

Fixes: ab6bf4e5e5 ("crypto: hash - Fix the pointer voodoo in...")
Reported-by: Sabrina Dubroca <sd@queasysnail.net>
Tested-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-21 09:30:06 +02:00
..
internal crypto: ahash - Fix EINPROGRESS notification callback 2017-04-21 09:30:06 +02:00
ablk_helper.h
aead.h crypto: aead - Remove old AEAD interfaces 2015-08-17 16:53:50 +08:00
aes.h
akcipher.h crypto: akcipher - Changes to asymmetric key API 2015-10-14 22:23:16 +08:00
algapi.h crypto: api - Add instance free function to crypto_type 2015-07-14 14:56:45 +08:00
authenc.h
b128ops.h
blowfish.h
cast_common.h
cast5.h
cast6.h
chacha20.h crypto: chacha20 - Export common ChaCha20 helpers 2015-07-17 21:20:21 +08:00
compress.h
cryptd.h
crypto_wq.h
ctr.h
des.h
drbg.h
gf128mul.h
ghash.h crypto: ghash-generic - move common definitions to a new header file 2016-10-22 12:26:56 +02:00
hash_info.h
hash.h crypto: hash - Add crypto_ahash_has_setkey 2016-02-17 12:31:03 -08:00
if_alg.h crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path 2016-02-17 12:31:03 -08:00
lrw.h
mcryptd.h
md5.h
null.h
padlock.h
pcrypt.h
pkcs7.h PKCS#7: Appropriately restrict authenticated attributes and content type 2015-08-12 17:01:01 +01:00
poly1305.h crypto: poly1305 - Export common Poly1305 helpers 2015-07-17 21:20:26 +08:00
public_key.h KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
rng.h
scatterwalk.h crypto: replace scatterwalk_sg_chain with sg_chain 2015-08-17 08:12:54 -06:00
serpent.h
sha.h
sha1_base.h
sha256_base.h
sha512_base.h
skcipher.h crypto: skcipher - Add crypto_skcipher_has_setkey 2016-02-17 12:31:03 -08:00
twofish.h
vmac.h
xts.h