crypto: aes-ni - Do not sleep when using the FPU

Because AES-NI instructions will touch XMM state, corresponding code
must be enclosed within kernel_fpu_begin/end, which 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>

authored by Huang Ying and committed by Herbert Xu 9251b64f e6efaa02

+4
+4
arch/x86/crypto/aesni-intel_glue.c
··· 198 199 blkcipher_walk_init(&walk, dst, src, nbytes); 200 err = blkcipher_walk_virt(desc, &walk); 201 202 kernel_fpu_begin(); 203 while ((nbytes = walk.nbytes)) { ··· 222 223 blkcipher_walk_init(&walk, dst, src, nbytes); 224 err = blkcipher_walk_virt(desc, &walk); 225 226 kernel_fpu_begin(); 227 while ((nbytes = walk.nbytes)) { ··· 268 269 blkcipher_walk_init(&walk, dst, src, nbytes); 270 err = blkcipher_walk_virt(desc, &walk); 271 272 kernel_fpu_begin(); 273 while ((nbytes = walk.nbytes)) { ··· 292 293 blkcipher_walk_init(&walk, dst, src, nbytes); 294 err = blkcipher_walk_virt(desc, &walk); 295 296 kernel_fpu_begin(); 297 while ((nbytes = walk.nbytes)) {
··· 198 199 blkcipher_walk_init(&walk, dst, src, nbytes); 200 err = blkcipher_walk_virt(desc, &walk); 201 + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; 202 203 kernel_fpu_begin(); 204 while ((nbytes = walk.nbytes)) { ··· 221 222 blkcipher_walk_init(&walk, dst, src, nbytes); 223 err = blkcipher_walk_virt(desc, &walk); 224 + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; 225 226 kernel_fpu_begin(); 227 while ((nbytes = walk.nbytes)) { ··· 266 267 blkcipher_walk_init(&walk, dst, src, nbytes); 268 err = blkcipher_walk_virt(desc, &walk); 269 + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; 270 271 kernel_fpu_begin(); 272 while ((nbytes = walk.nbytes)) { ··· 289 290 blkcipher_walk_init(&walk, dst, src, nbytes); 291 err = blkcipher_walk_virt(desc, &walk); 292 + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; 293 294 kernel_fpu_begin(); 295 while ((nbytes = walk.nbytes)) {