summaryrefslogtreecommitdiffstats
path: root/crypto/skcipher.c
diff options
context:
space:
mode:
authorEric Biggers2018-12-15 21:40:17 +0100
committerHerbert Xu2018-12-23 04:52:44 +0100
commitf9c9bdb5131eee60dc3b92e5126d4c0e291703e2 (patch)
tree880c29e660d78a9cd191af522a0068a9c62f7731 /crypto/skcipher.c
parentcrypto: cavium/nitrox - Added AEAD cipher support (diff)
downloadkernel-qcow2-linux-f9c9bdb5131eee60dc3b92e5126d4c0e291703e2.tar.gz
kernel-qcow2-linux-f9c9bdb5131eee60dc3b92e5126d4c0e291703e2.tar.xz
kernel-qcow2-linux-f9c9bdb5131eee60dc3b92e5126d4c0e291703e2.zip
crypto: x86/chacha - avoid sleeping under kernel_fpu_begin()
Passing atomic=true to skcipher_walk_virt() only makes the later skcipher_walk_done() calls use atomic memory allocations, not skcipher_walk_virt() itself. Thus, we have to move it outside of the preemption-disabled region (kernel_fpu_begin()/kernel_fpu_end()). (skcipher_walk_virt() only allocates memory for certain layouts of the input scatterlist, hence why I didn't notice this earlier...) Reported-by: syzbot+9bf843c33f782d73ae7d@syzkaller.appspotmail.com Fixes: 4af78261870a ("crypto: x86/chacha20 - add XChaCha20 support") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/skcipher.c')
0 files changed, 0 insertions, 0 deletions