diff options
author | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 00:11:50 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 00:11:50 -0700 |
commit | 48467641bcc057f7cba3b6cbbe66cb834d64cc81 (patch) | |
tree | f7c5c5e964c220de30fcdcd06b0f1efdb3e22439 /drivers/md/dm-crypt.c | |
parent | 3863e72414fa2ebf5f3b615d1bf99de32e59980a (diff) | |
parent | d70063c4634af060a5387337b7632f6334ca3458 (diff) | |
download | linux-3.10-48467641bcc057f7cba3b6cbbe66cb834d64cc81.tar.gz linux-3.10-48467641bcc057f7cba3b6cbbe66cb834d64cc81.tar.bz2 linux-3.10-48467641bcc057f7cba3b6cbbe66cb834d64cc81.zip |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/md/dm-crypt.c')
-rw-r--r-- | drivers/md/dm-crypt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index d0a4bab220e..b82bc315047 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -144,7 +144,7 @@ static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, } /* Hash the cipher key with the given hash algorithm */ - hash_tfm = crypto_alloc_tfm(opts, 0); + hash_tfm = crypto_alloc_tfm(opts, CRYPTO_TFM_REQ_MAY_SLEEP); if (hash_tfm == NULL) { ti->error = PFX "Error initializing ESSIV hash"; return -EINVAL; @@ -172,7 +172,8 @@ static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, /* Setup the essiv_tfm with the given salt */ essiv_tfm = crypto_alloc_tfm(crypto_tfm_alg_name(cc->tfm), - CRYPTO_TFM_MODE_ECB); + CRYPTO_TFM_MODE_ECB | + CRYPTO_TFM_REQ_MAY_SLEEP); if (essiv_tfm == NULL) { ti->error = PFX "Error allocating crypto tfm for ESSIV"; kfree(salt); @@ -587,7 +588,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) goto bad1; } - tfm = crypto_alloc_tfm(cipher, crypto_flags); + tfm = crypto_alloc_tfm(cipher, crypto_flags | CRYPTO_TFM_REQ_MAY_SLEEP); if (!tfm) { ti->error = PFX "Error allocating crypto tfm"; goto bad1; |