aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/authenc.c5
-rw-r--r--crypto/cryptd.c4
-rw-r--r--crypto/eseqiv.c3
3 files changed, 8 insertions, 4 deletions
diff --git a/crypto/authenc.c b/crypto/authenc.c
index ed8ac5a6fa5f..4b226768752a 100644
--- a/crypto/authenc.c
+++ b/crypto/authenc.c
@@ -217,9 +217,10 @@ static void crypto_authenc_givencrypt_done(struct crypto_async_request *req,
217 int err) 217 int err)
218{ 218{
219 if (!err) { 219 if (!err) {
220 struct aead_givcrypt_request *greq = req->data; 220 struct aead_request *areq = req->data;
221 struct skcipher_givcrypt_request *greq = aead_request_ctx(areq);
221 222
222 err = crypto_authenc_genicv(&greq->areq, greq->giv, 0); 223 err = crypto_authenc_genicv(areq, greq->giv, 0);
223 } 224 }
224 225
225 aead_request_complete(req->data, err); 226 aead_request_complete(req->data, err);
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index 250425263e00..b150de562057 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -190,8 +190,10 @@ static struct crypto_instance *cryptd_alloc_instance(struct crypto_alg *alg,
190 int err; 190 int err;
191 191
192 inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL); 192 inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL);
193 if (IS_ERR(inst)) 193 if (!inst) {
194 inst = ERR_PTR(-ENOMEM);
194 goto out; 195 goto out;
196 }
195 197
196 err = -ENAMETOOLONG; 198 err = -ENAMETOOLONG;
197 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, 199 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME,
diff --git a/crypto/eseqiv.c b/crypto/eseqiv.c
index b14f14e314b6..881d30910434 100644
--- a/crypto/eseqiv.c
+++ b/crypto/eseqiv.c
@@ -136,7 +136,8 @@ static int eseqiv_givencrypt(struct skcipher_givcrypt_request *req)
136 } 136 }
137 137
138 ablkcipher_request_set_crypt(subreq, reqctx->src, dst, 138 ablkcipher_request_set_crypt(subreq, reqctx->src, dst,
139 req->creq.nbytes, req->creq.info); 139 req->creq.nbytes + ivsize,
140 req->creq.info);
140 141
141 memcpy(req->creq.info, ctx->salt, ivsize); 142 memcpy(req->creq.info, ctx->salt, ivsize);
142 143