Commit bb648291 authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu

crypto: skcipher - add might_sleep() to skcipher_walk_virt()

skcipher_walk_virt() can still sleep even with atomic=true, since that
only affects the later calls to skcipher_walk_done().  But,
skcipher_walk_virt() only has to allocate memory for some input data
layouts, so incorrectly calling it with preemption disabled can go
undetected.  Use might_sleep() so that it's detected reliably.
Signed-off-by: default avatarEric Biggers <>
Signed-off-by: default avatarHerbert Xu <>
parent f9c9bdb5
......@@ -474,6 +474,8 @@ int skcipher_walk_virt(struct skcipher_walk *walk,
int err;
might_sleep_if(req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP);
walk->flags &= ~SKCIPHER_WALK_PHYS;
err = skcipher_walk_skcipher(walk, req);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment