crypto: rockchip: cryptodev: add akcipher_request_set_callback for rsa

Missing akcipher_request_set_callback will cause a process exception
 when rsa works in asynchronous mode.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I99d3ffde471269528f42869d052004a25a6c14b0
This commit is contained in:
Lin Jinhan
2024-01-25 16:11:36 +08:00
committed by Tao Huang
parent 497d03d9a2
commit 3258128cd9

View File

@@ -708,6 +708,9 @@ static int crypto_rsa_run(struct fcrypt *fcr, struct kernel_crypt_rsa_op *krop)
crypto_init_wait(&wait);
akcipher_request_set_crypt(req, &src, &dst, rop->in_len, out_len_max);
akcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
crypto_req_done, &wait);
switch (rop->op) {
case AOP_ENCRYPT:
ret = crypto_wait_req(crypto_akcipher_encrypt(req), &wait);