Skip to content

Commit 878d87f

Browse files
ebiggersherbertx
authored andcommitted
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 8b13c22 commit 878d87f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crypto/skcipher.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ int skcipher_walk_done(struct skcipher_walk *walk, int res)
146146
scatterwalk_done(&walk->out, 1, total);
147147

148148
if (total) {
149-
crypto_yield(walk->flags & SKCIPHER_WALK_SLEEP ?
150-
CRYPTO_TFM_REQ_MAY_SLEEP : 0);
149+
if (walk->flags & SKCIPHER_WALK_SLEEP)
150+
cond_resched();
151151
walk->flags &= ~(SKCIPHER_WALK_SLOW | SKCIPHER_WALK_COPY |
152152
SKCIPHER_WALK_DIFF);
153153
return skcipher_walk_next(walk);

0 commit comments

Comments
 (0)