diff options
| author | David S. Miller <davem@davemloft.net> | 2012-12-19 18:44:31 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-12-19 18:44:31 -0500 |
| commit | 62ba63dc892cf836ecb9ce4fdb7644d45c95070b (patch) | |
| tree | 19e67570300545d337d7f3aead6557ef8f194457 | |
| parent | b3a37947074fa0a488d6c7ede58125b2278ab4e8 (diff) | |
sparc64: Set CRYPTO_TFM_REQ_MAY_SLEEP consistently in CAMELLIA code.
We use the FPU and therefore cannot sleep during the crypto
loops.
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | arch/sparc/crypto/camellia_glue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sparc/crypto/camellia_glue.c b/arch/sparc/crypto/camellia_glue.c index 62c89af3fd3f..888f6260b4ec 100644 --- a/arch/sparc/crypto/camellia_glue.c +++ b/arch/sparc/crypto/camellia_glue.c | |||
| @@ -98,6 +98,7 @@ static int __ecb_crypt(struct blkcipher_desc *desc, | |||
| 98 | 98 | ||
| 99 | blkcipher_walk_init(&walk, dst, src, nbytes); | 99 | blkcipher_walk_init(&walk, dst, src, nbytes); |
| 100 | err = blkcipher_walk_virt(desc, &walk); | 100 | err = blkcipher_walk_virt(desc, &walk); |
| 101 | desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; | ||
| 101 | 102 | ||
| 102 | if (encrypt) | 103 | if (encrypt) |
| 103 | key = &ctx->encrypt_key[0]; | 104 | key = &ctx->encrypt_key[0]; |
| @@ -160,6 +161,7 @@ static int cbc_encrypt(struct blkcipher_desc *desc, | |||
| 160 | 161 | ||
| 161 | blkcipher_walk_init(&walk, dst, src, nbytes); | 162 | blkcipher_walk_init(&walk, dst, src, nbytes); |
| 162 | err = blkcipher_walk_virt(desc, &walk); | 163 | err = blkcipher_walk_virt(desc, &walk); |
| 164 | desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; | ||
| 163 | 165 | ||
| 164 | key = &ctx->encrypt_key[0]; | 166 | key = &ctx->encrypt_key[0]; |
| 165 | camellia_sparc64_load_keys(key, ctx->key_len); | 167 | camellia_sparc64_load_keys(key, ctx->key_len); |
| @@ -198,6 +200,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc, | |||
| 198 | 200 | ||
| 199 | blkcipher_walk_init(&walk, dst, src, nbytes); | 201 | blkcipher_walk_init(&walk, dst, src, nbytes); |
| 200 | err = blkcipher_walk_virt(desc, &walk); | 202 | err = blkcipher_walk_virt(desc, &walk); |
| 203 | desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; | ||
| 201 | 204 | ||
| 202 | key = &ctx->decrypt_key[0]; | 205 | key = &ctx->decrypt_key[0]; |
| 203 | camellia_sparc64_load_keys(key, ctx->key_len); | 206 | camellia_sparc64_load_keys(key, ctx->key_len); |
