Skip to content

Commit

Permalink
crypto: aes-ni - Remove CRYPTO_TFM_REQ_MAY_SLEEP from fpu template
Browse files Browse the repository at this point in the history
kernel_fpu_begin/end used preempt_disable/enable, so sleep should be
prevented between kernel_fpu_begin/end.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Huang Ying authored and Herbert Xu committed Jun 18, 2009
1 parent 9251b64 commit b6f34d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/crypto/fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static int crypto_fpu_encrypt(struct blkcipher_desc *desc_in,
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();
Expand All @@ -67,7 +67,7 @@ static int crypto_fpu_decrypt(struct blkcipher_desc *desc_in,
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();
Expand Down

0 comments on commit b6f34d4

Please sign in to comment.