aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-11-09 12:44:12 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2011-11-21 03:13:25 -0500
commitd35643385628d44a5933a0755b01478eb4df5c65 (patch)
treeab76260a738e8eec1ff153503bc392c7cca916a6 /arch
parent5962f8b66dd040ad89d55b58967ea2dec607f4d3 (diff)
crypto: serpent-sse2 - clear CRYPTO_TFM_REQ_MAY_SLEEP in lrw and xts modes
LRW/XTS patches for serpent-sse2 forgot to add this. CRYPTO_TFM_REQ_MAY_SLEEP should be cleared as sleeping between kernel_fpu_begin()/kernel_fpu_end() is not allowed. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/crypto/serpent_sse2_glue.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/crypto/serpent_sse2_glue.c b/arch/x86/crypto/serpent_sse2_glue.c
index 2dffc5ab883e..2f5c304653f4 100644
--- a/arch/x86/crypto/serpent_sse2_glue.c
+++ b/arch/x86/crypto/serpent_sse2_glue.c
@@ -554,6 +554,7 @@ static int lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
554 }; 554 };
555 int ret; 555 int ret;
556 556
557 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
557 ret = lrw_crypt(desc, dst, src, nbytes, &req); 558 ret = lrw_crypt(desc, dst, src, nbytes, &req);
558 serpent_fpu_end(crypt_ctx.fpu_enabled); 559 serpent_fpu_end(crypt_ctx.fpu_enabled);
559 560
@@ -579,6 +580,7 @@ static int lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
579 }; 580 };
580 int ret; 581 int ret;
581 582
583 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
582 ret = lrw_crypt(desc, dst, src, nbytes, &req); 584 ret = lrw_crypt(desc, dst, src, nbytes, &req);
583 serpent_fpu_end(crypt_ctx.fpu_enabled); 585 serpent_fpu_end(crypt_ctx.fpu_enabled);
584 586
@@ -671,6 +673,7 @@ static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
671 }; 673 };
672 int ret; 674 int ret;
673 675
676 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
674 ret = xts_crypt(desc, dst, src, nbytes, &req); 677 ret = xts_crypt(desc, dst, src, nbytes, &req);
675 serpent_fpu_end(crypt_ctx.fpu_enabled); 678 serpent_fpu_end(crypt_ctx.fpu_enabled);
676 679
@@ -697,6 +700,7 @@ static int xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
697 }; 700 };
698 int ret; 701 int ret;
699 702
703 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
700 ret = xts_crypt(desc, dst, src, nbytes, &req); 704 ret = xts_crypt(desc, dst, src, nbytes, &req);
701 serpent_fpu_end(crypt_ctx.fpu_enabled); 705 serpent_fpu_end(crypt_ctx.fpu_enabled);
702 706