diff options
author | Steve French <sfrench@us.ibm.com> | 2005-09-06 15:47:31 -0700 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-09-06 15:47:31 -0700 |
commit | c08319a9d50b5c9cb4fdb33728bd16497cf4ddd3 (patch) | |
tree | 5fbec9030029da1ec387c18b85f26f19ee50da44 /drivers/md/dm-crypt.c | |
parent | bfa0d75a1eee59f0577e3c1697ff570b77581a35 (diff) | |
parent | 4706df3d3c42af802597d82c8b1542c3d52eab23 (diff) | |
download | talos-op-linux-c08319a9d50b5c9cb4fdb33728bd16497cf4ddd3.tar.gz talos-op-linux-c08319a9d50b5c9cb4fdb33728bd16497cf4ddd3.zip |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
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 d0a4bab220e5..b82bc3150476 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; |