summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-09-13 16:22:24 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2018-09-13 16:22:24 -1000
commit1d176582c795d05d15245f75407a3e1db62f740a (patch)
treed2c10461efd16833dc722119e06fb59fb1185be2 /arch/s390
parent7a9cdebdcc17e426fb5287e4a82db1dfe86339b2 (diff)
parentfa108f95c6769ec15ea59b7db00454b82afc6121 (diff)
downloadblackbird-op-linux-1d176582c795d05d15245f75407a3e1db62f740a.tar.gz
blackbird-op-linux-1d176582c795d05d15245f75407a3e1db62f740a.zip
Merge tag 's390-4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky: - One fix for the zcrypt driver to correctly handle incomplete encryption/decryption operations. - A cleanup for the aqmask/apmask parsing to avoid variable length arrays on the stack. * tag 's390-4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/zcrypt: remove VLA usage from the AP bus s390/crypto: Fix return code checking in cbc_paes_crypt()
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/crypto/paes_s390.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/crypto/paes_s390.c b/arch/s390/crypto/paes_s390.c
index 80b27294c1de..ab9a0ebecc19 100644
--- a/arch/s390/crypto/paes_s390.c
+++ b/arch/s390/crypto/paes_s390.c
@@ -208,7 +208,7 @@ static int cbc_paes_crypt(struct blkcipher_desc *desc, unsigned long modifier,
walk->dst.virt.addr, walk->src.virt.addr, n);
if (k)
ret = blkcipher_walk_done(desc, walk, nbytes - k);
- if (n < k) {
+ if (k < n) {
if (__cbc_paes_set_key(ctx) != 0)
return blkcipher_walk_done(desc, walk, -EIO);
memcpy(param.key, ctx->pk.protkey, MAXPROTKEYSIZE);
OpenPOWER on IntegriCloud