summaryrefslogtreecommitdiff
path: root/include/crypto
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2017-10-18 08:00:41 +0100
committerMircea Pop <mircea.pop@nxp.com>2019-05-14 09:54:35 +0200
commit5c300d951c90c8fd3b5b53d100cdc3d5f2d43058 (patch)
tree653733ded0e69ab5703c1ed2a959fb6c6828a545 /include/crypto
parentebcfc56c6c2ff5b8e2485ac0558403559c480536 (diff)
crypto: drbg - move to generic async completion
DRBG is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. The code now also passes CRYPTO_TFM_REQ_MAY_SLEEP flag indicating crypto request memory allocation may use GFP_KERNEL which should be perfectly fine as the code is obviously sleeping for the completion of the request any way. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> (cherry picked from commit 85a2dea4bdbfa7565818ca094d08e838cf62da77)
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/drbg.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/crypto/drbg.h b/include/crypto/drbg.h
index 22f884c97387..8f941102af36 100644
--- a/include/crypto/drbg.h
+++ b/include/crypto/drbg.h
@@ -126,8 +126,7 @@ struct drbg_state {
__u8 *ctr_null_value; /* CTR mode aligned zero buf */
__u8 *outscratchpadbuf; /* CTR mode output scratchpad */
__u8 *outscratchpad; /* CTR mode aligned outbuf */
- struct completion ctr_completion; /* CTR mode async handler */
- int ctr_async_err; /* CTR mode async error */
+ struct crypto_wait ctr_wait; /* CTR mode async wait obj */
bool seeded; /* DRBG fully seeded? */
bool pr; /* Prediction resistance enabled? */