diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-10-18 09:00:41 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-11-03 15:11:19 +0100 |
commit | 85a2dea4bdbfa7565818ca094d08e838cf62da77 (patch) | |
tree | 7dc78fee7b511e9a26664cc3b25d0be9a6d35d97 /include/crypto/drbg.h | |
parent | crypto: move pub key to generic async completion (diff) | |
download | linux-85a2dea4bdbfa7565818ca094d08e838cf62da77.tar.xz 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 '')
-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? */ |