Commit 65974469 authored by yangdepei's avatar yangdepei
Browse files

crypto: ccp: fix sm2 not return due to wrong complete callback parameter

hygon inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I99ZNA



--------------------------------

the complete callback 'crypto_req_done' has changed its input parameter,
we need update input in ccp-crypto implement.
Fixes: acafe30ff58a ("crypto: ccp: Support SM2 algorithm for hygon ccp.")

Signed-off-by: default avataryangdepei <yangdepei@hygon.cn>
parent 60a4c2d9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -646,7 +646,7 @@ static void ccp_sm2_enc_compute(struct work_struct *work)
	crypto_free_shash(shash);

e_complete:
	req->base.complete(&req->base, ret);
	req->base.complete(req->base.data, ret);
}

static void ccp_sm2_enc_lp(struct work_struct *work)
@@ -672,7 +672,7 @@ static void ccp_sm2_enc_lp(struct work_struct *work)

	ret = ccp_sm2_post_cmd(rctx, CCP_SM2_LP_SRC_SIZE, CCP_SM2_MODE_LP, 0);
	if (ret != -EBUSY && ret != -EINPROGRESS)
		req->base.complete(&req->base, ret);
		req->base.complete(req->base.data, ret);
}

static int ccp_sm2_encrypt(struct akcipher_request *req)
@@ -749,7 +749,7 @@ static void ccp_sm2_dec_compute(struct work_struct *work)
	/* clear private key, plain, and dC1 */
	memset(rctx->src, 0, CCP_SM2_OPERAND_LEN * 2);
	memset(dst, 0, CCP_SM2_DST_SIZE);
	req->base.complete(&req->base, ret);
	req->base.complete(req->base.data, ret);
}

static int ccp_sm2_decrypt(struct akcipher_request *req)