summaryrefslogtreecommitdiff
path: root/crypto/skcipher.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-01-18 09:32:15 +1000
committerDave Airlie <airlied@redhat.com>2018-01-18 09:32:15 +1000
commit567eef3a35d08d4bfb49057c9779bce7a66a6908 (patch)
tree2bf17da93b86508fe2f66e87f39897a1d4b403dc /crypto/skcipher.c
parentbc77326f864263acbf6f8e6ac6be2d647ac9cc78 (diff)
parent21864b027d847a6d91903a5ba219770403ba8aad (diff)
downloadlinux-crypto-567eef3a35d08d4bfb49057c9779bce7a66a6908.tar.gz
linux-crypto-567eef3a35d08d4bfb49057c9779bce7a66a6908.zip
BackMerge tag 'v4.15-rc8' into drm-next
Linux 4.15-rc8 Daniel requested this for so the intel CI won't fall over on drm-next so often.
Diffstat (limited to 'crypto/skcipher.c')
-rw-r--r--crypto/skcipher.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/skcipher.c b/crypto/skcipher.c
index 778e0ff4..11af5fd6 100644
--- a/crypto/skcipher.c
+++ b/crypto/skcipher.c
@@ -449,6 +449,8 @@ static int skcipher_walk_skcipher(struct skcipher_walk *walk,
walk->total = req->cryptlen;
walk->nbytes = 0;
+ walk->iv = req->iv;
+ walk->oiv = req->iv;
if (unlikely(!walk->total))
return 0;
@@ -456,9 +458,6 @@ static int skcipher_walk_skcipher(struct skcipher_walk *walk,
scatterwalk_start(&walk->in, req->src);
scatterwalk_start(&walk->out, req->dst);
- walk->iv = req->iv;
- walk->oiv = req->iv;
-
walk->flags &= ~SKCIPHER_WALK_SLEEP;
walk->flags |= req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP ?
SKCIPHER_WALK_SLEEP : 0;
@@ -510,6 +509,8 @@ static int skcipher_walk_aead_common(struct skcipher_walk *walk,
int err;
walk->nbytes = 0;
+ walk->iv = req->iv;
+ walk->oiv = req->iv;
if (unlikely(!walk->total))
return 0;
@@ -525,9 +526,6 @@ static int skcipher_walk_aead_common(struct skcipher_walk *walk,
scatterwalk_done(&walk->in, 0, walk->total);
scatterwalk_done(&walk->out, 0, walk->total);
- walk->iv = req->iv;
- walk->oiv = req->iv;
-
if (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP)
walk->flags |= SKCIPHER_WALK_SLEEP;
else