hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/crypto/rsa-pkcs1pad.c
....@@ -214,16 +214,14 @@
214214 struct crypto_async_request *child_async_req, int err)
215215 {
216216 struct akcipher_request *req = child_async_req->data;
217
- struct crypto_async_request async_req;
218217
219218 if (err == -EINPROGRESS)
220
- return;
219
+ goto out;
221220
222
- async_req.data = req->base.data;
223
- async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req));
224
- async_req.flags = child_async_req->flags;
225
- req->base.complete(&async_req,
226
- pkcs1pad_encrypt_sign_complete(req, err));
221
+ err = pkcs1pad_encrypt_sign_complete(req, err);
222
+
223
+out:
224
+ akcipher_request_complete(req, err);
227225 }
228226
229227 static int pkcs1pad_encrypt(struct akcipher_request *req)
....@@ -332,15 +330,14 @@
332330 struct crypto_async_request *child_async_req, int err)
333331 {
334332 struct akcipher_request *req = child_async_req->data;
335
- struct crypto_async_request async_req;
336333
337334 if (err == -EINPROGRESS)
338
- return;
335
+ goto out;
339336
340
- async_req.data = req->base.data;
341
- async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req));
342
- async_req.flags = child_async_req->flags;
343
- req->base.complete(&async_req, pkcs1pad_decrypt_complete(req, err));
337
+ err = pkcs1pad_decrypt_complete(req, err);
338
+
339
+out:
340
+ akcipher_request_complete(req, err);
344341 }
345342
346343 static int pkcs1pad_decrypt(struct akcipher_request *req)
....@@ -512,15 +509,14 @@
512509 struct crypto_async_request *child_async_req, int err)
513510 {
514511 struct akcipher_request *req = child_async_req->data;
515
- struct crypto_async_request async_req;
516512
517513 if (err == -EINPROGRESS)
518
- return;
514
+ goto out;
519515
520
- async_req.data = req->base.data;
521
- async_req.tfm = crypto_akcipher_tfm(crypto_akcipher_reqtfm(req));
522
- async_req.flags = child_async_req->flags;
523
- req->base.complete(&async_req, pkcs1pad_verify_complete(req, err));
516
+ err = pkcs1pad_verify_complete(req, err);
517
+
518
+out:
519
+ akcipher_request_complete(req, err);
524520 }
525521
526522 /*