diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-10-18 08:00:41 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-11-03 22:11:19 +0800 |
commit | 85a2dea4bdbfa7565818ca094d08e838cf62da77 (patch) | |
tree | 7dc78fee7b511e9a26664cc3b25d0be9a6d35d97 /include/crypto | |
parent | 0ca2a04ac398a71e49b0b093f365d1188cc13e01 (diff) | |
download | linux-85a2dea4bdbfa7565818ca094d08e838cf62da77.tar.gz linux-85a2dea4bdbfa7565818ca094d08e838cf62da77.tar.bz2 linux-85a2dea4bdbfa7565818ca094d08e838cf62da77.zip |
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>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/drbg.h | 3 |
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? */ |