diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-09-01 17:43:25 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-01 17:43:25 -0700 |
commit | eb6f1160ddb2fdadf50f350da79d0796c37f17e2 (patch) | |
tree | e7b048b089b4b0ec9f121eea9a7f5864999dbac3 /drivers/block/cryptoloop.c | |
parent | 64baf3cfea974d2b9e671ccfdbc03e030ea5ebc6 (diff) | |
download | linux-eb6f1160ddb2fdadf50f350da79d0796c37f17e2.tar.gz linux-eb6f1160ddb2fdadf50f350da79d0796c37f17e2.tar.xz |
[CRYPTO]: Use CRYPTO_TFM_REQ_MAY_SLEEP where appropriate
This patch goes through the current users of the crypto layer and sets
CRYPTO_TFM_REQ_MAY_SLEEP at crypto_alloc_tfm() where all crypto operations
are performed in process context.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/block/cryptoloop.c')
-rw-r--r-- | drivers/block/cryptoloop.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/cryptoloop.c b/drivers/block/cryptoloop.c index 5be6f998d8c5..3d4261c39f16 100644 --- a/drivers/block/cryptoloop.c +++ b/drivers/block/cryptoloop.c @@ -57,9 +57,11 @@ cryptoloop_init(struct loop_device *lo, const struct loop_info64 *info) mode = strsep(&cmsp, "-"); if (mode == NULL || strcmp(mode, "cbc") == 0) - tfm = crypto_alloc_tfm(cipher, CRYPTO_TFM_MODE_CBC); + tfm = crypto_alloc_tfm(cipher, CRYPTO_TFM_MODE_CBC | + CRYPTO_TFM_REQ_MAY_SLEEP); else if (strcmp(mode, "ecb") == 0) - tfm = crypto_alloc_tfm(cipher, CRYPTO_TFM_MODE_ECB); + tfm = crypto_alloc_tfm(cipher, CRYPTO_TFM_MODE_ECB | + CRYPTO_TFM_REQ_MAY_SLEEP); if (tfm == NULL) return -EINVAL; |