提交 62ba63dc 编写于 作者: D David S. Miller

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: NDavid S. Miller <davem@davemloft.net>
上级 b3a37947
...@@ -98,6 +98,7 @@ static int __ecb_crypt(struct blkcipher_desc *desc, ...@@ -98,6 +98,7 @@ static int __ecb_crypt(struct blkcipher_desc *desc,
blkcipher_walk_init(&walk, dst, src, nbytes); blkcipher_walk_init(&walk, dst, src, nbytes);
err = blkcipher_walk_virt(desc, &walk); err = blkcipher_walk_virt(desc, &walk);
desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
if (encrypt) if (encrypt)
key = &ctx->encrypt_key[0]; key = &ctx->encrypt_key[0];
...@@ -160,6 +161,7 @@ static int cbc_encrypt(struct blkcipher_desc *desc, ...@@ -160,6 +161,7 @@ static int cbc_encrypt(struct blkcipher_desc *desc,
blkcipher_walk_init(&walk, dst, src, nbytes); blkcipher_walk_init(&walk, dst, src, nbytes);
err = blkcipher_walk_virt(desc, &walk); err = blkcipher_walk_virt(desc, &walk);
desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
key = &ctx->encrypt_key[0]; key = &ctx->encrypt_key[0];
camellia_sparc64_load_keys(key, ctx->key_len); camellia_sparc64_load_keys(key, ctx->key_len);
...@@ -198,6 +200,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc, ...@@ -198,6 +200,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc,
blkcipher_walk_init(&walk, dst, src, nbytes); blkcipher_walk_init(&walk, dst, src, nbytes);
err = blkcipher_walk_virt(desc, &walk); err = blkcipher_walk_virt(desc, &walk);
desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
key = &ctx->decrypt_key[0]; key = &ctx->decrypt_key[0];
camellia_sparc64_load_keys(key, ctx->key_len); camellia_sparc64_load_keys(key, ctx->key_len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册