summaryrefslogtreecommitdiffstats
path: root/crypto/seqiv.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/seqiv.c')
-rw-r--r--crypto/seqiv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/seqiv.c b/crypto/seqiv.c
index 64a412be255e..ed1b0e9f2436 100644
--- a/crypto/seqiv.c
+++ b/crypto/seqiv.c
@@ -89,13 +89,12 @@ static int seqiv_aead_encrypt(struct aead_request *req)
89 89
90 if (unlikely(!IS_ALIGNED((unsigned long)info, 90 if (unlikely(!IS_ALIGNED((unsigned long)info,
91 crypto_aead_alignmask(geniv) + 1))) { 91 crypto_aead_alignmask(geniv) + 1))) {
92 info = kmalloc(ivsize, req->base.flags & 92 info = kmemdup(req->iv, ivsize, req->base.flags &
93 CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL: 93 CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL :
94 GFP_ATOMIC); 94 GFP_ATOMIC);
95 if (!info) 95 if (!info)
96 return -ENOMEM; 96 return -ENOMEM;
97 97
98 memcpy(info, req->iv, ivsize);
99 compl = seqiv_aead_encrypt_complete; 98 compl = seqiv_aead_encrypt_complete;
100 data = req; 99 data = req;
101 } 100 }