Skip to content

Commit 62ba63d

Browse files
committed
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>
1 parent b3a3794 commit 62ba63d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/sparc/crypto/camellia_glue.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ static int __ecb_crypt(struct blkcipher_desc *desc,
9898

9999
blkcipher_walk_init(&walk, dst, src, nbytes);
100100
err = blkcipher_walk_virt(desc, &walk);
101+
desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
101102

102103
if (encrypt)
103104
key = &ctx->encrypt_key[0];
@@ -160,6 +161,7 @@ static int cbc_encrypt(struct blkcipher_desc *desc,
160161

161162
blkcipher_walk_init(&walk, dst, src, nbytes);
162163
err = blkcipher_walk_virt(desc, &walk);
164+
desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
163165

164166
key = &ctx->encrypt_key[0];
165167
camellia_sparc64_load_keys(key, ctx->key_len);
@@ -198,6 +200,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc,
198200

199201
blkcipher_walk_init(&walk, dst, src, nbytes);
200202
err = blkcipher_walk_virt(desc, &walk);
203+
desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
201204

202205
key = &ctx->decrypt_key[0];
203206
camellia_sparc64_load_keys(key, ctx->key_len);

0 commit comments

Comments
 (0)