diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2024-01-17 21:58:28 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-01-17 21:58:28 +0100 |
commit | fe33c0fbed75dd464747c0faaedf94c7d8eb4101 (patch) | |
tree | 057a9d98ca492c55708baedcc59bf2ea3e2511c7 /arch/s390/crypto/paes_s390.c | |
parent | userfaultfd: avoid huge_zero_page in UFFDIO_MOVE (diff) | |
parent | Merge tag 'exfat-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-fe33c0fbed75dd464747c0faaedf94c7d8eb4101.tar.xz linux-fe33c0fbed75dd464747c0faaedf94c7d8eb4101.zip |
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'arch/s390/crypto/paes_s390.c')
-rw-r--r-- | arch/s390/crypto/paes_s390.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/crypto/paes_s390.c b/arch/s390/crypto/paes_s390.c index 8b541e44151d..55ee5567a5ea 100644 --- a/arch/s390/crypto/paes_s390.c +++ b/arch/s390/crypto/paes_s390.c @@ -693,9 +693,11 @@ static int ctr_paes_crypt(struct skcipher_request *req) * final block may be < AES_BLOCK_SIZE, copy only nbytes */ if (nbytes) { + memset(buf, 0, AES_BLOCK_SIZE); + memcpy(buf, walk.src.virt.addr, nbytes); while (1) { if (cpacf_kmctr(ctx->fc, ¶m, buf, - walk.src.virt.addr, AES_BLOCK_SIZE, + buf, AES_BLOCK_SIZE, walk.iv) == AES_BLOCK_SIZE) break; if (__paes_convert_key(ctx)) |