X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=arch%2Fs390%2Fcrypto%2Fdes_s390.c;h=7acb77f7ef1ada0183280c07e75f2c34579bac72;hb=2770b8b1fdf03c4dad6fc8f7e38101a9c4082f7b;hp=0a5aac8a9412b64c4b2c43f9999e0f1e2f3815cb;hpb=45b15d98a96ffdb3c608bdad952f51930c151420;p=karo-tx-linux.git diff --git a/arch/s390/crypto/des_s390.c b/arch/s390/crypto/des_s390.c index 0a5aac8a9412..7acb77f7ef1a 100644 --- a/arch/s390/crypto/des_s390.c +++ b/arch/s390/crypto/des_s390.c @@ -429,6 +429,9 @@ static int ctr_desall_crypt(struct blkcipher_desc *desc, long func, else memcpy(walk->iv, ctrptr, DES_BLOCK_SIZE); spin_unlock(&ctrblk_lock); + } else { + if (!nbytes) + memcpy(walk->iv, ctrptr, DES_BLOCK_SIZE); } /* final block may be < DES_BLOCK_SIZE, copy only nbytes */ if (nbytes) {