From: Eric Biggers Date: Sun, 5 Jan 2025 19:34:16 +0000 (-0800) Subject: crypto: skcipher - call cond_resched() directly X-Git-Tag: v6.14-rc1~112^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=878d87fc6877bc6989b40bb02c4c2ce58be51a6b;p=thirdparty%2Flinux.git crypto: skcipher - call cond_resched() directly In skcipher_walk_done(), instead of calling crypto_yield() which requires a translation between flags, just call cond_resched() directly. This has the same effect. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu --- diff --git a/crypto/skcipher.c b/crypto/skcipher.c index 6b62d816f08d1..a9eb2dcf28982 100644 --- a/crypto/skcipher.c +++ b/crypto/skcipher.c @@ -146,8 +146,8 @@ unmap_src: scatterwalk_done(&walk->out, 1, total); if (total) { - crypto_yield(walk->flags & SKCIPHER_WALK_SLEEP ? - CRYPTO_TFM_REQ_MAY_SLEEP : 0); + if (walk->flags & SKCIPHER_WALK_SLEEP) + cond_resched(); walk->flags &= ~(SKCIPHER_WALK_SLOW | SKCIPHER_WALK_COPY | SKCIPHER_WALK_DIFF); return skcipher_walk_next(walk);