Skip to contentSkip to conversation

crypto: Remove CRYPTO_TFM_REQ_MAY_SLEEP from fpu template

PATCH In review Huang Ying 1 participant 1 message Jun 15, 2009

Subsystems (2)
lore
Share & tools
lore

Huang Ying

author
#0 lore raw

PATCH 3/3 crypto: Remove CRYPTO_TFM_REQ_MAY_SLEEP from fpu template

kernel_fpu_begin/end used preempt_disable/enable, so sleep should be prevented between kernel_fpu_begin/end.

---
 arch/x86/crypto/fpu.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/crypto/fpu.c +2 -2
@@ -48,7 +48,7 @@ static int crypto_fpu_encrypt(struct blk
 	struct blkcipher_desc desc = {
 		.tfm = child,
 		.info = desc_in->info,
-		.flags = desc_in->flags,
+		.flags = desc_in->flags & ~CRYPTO_TFM_REQ_MAY_SLEEP,
 	};
 
 	kernel_fpu_begin();
@@ -67,7 +67,7 @@ static int crypto_fpu_decrypt(struct blk
 	struct blkcipher_desc desc = {
 		.tfm = child,
 		.info = desc_in->info,
-		.flags = desc_in->flags,
+		.flags = desc_in->flags & ~CRYPTO_TFM_REQ_MAY_SLEEP,
 	};
 
 	kernel_fpu_begin();