Skip to content

Commit a72a304

Browse files
Qunqin Zhaoopsiff
authored andcommitted
crypto: loongson: fix sm3 engine while(true) problem
If the amount of data is relatively large, the crypto interface will use two different requests, then "sae->rctx && sae->rctx != rctx" will be true forever. Tested-by: Yuan Feng <fengyuan@uniontech.com> Signed-off-by: Qunqin Zhao <zhaoqunqin@loongson.cn> Signed-off-by: WangYuli <wangyuli@uniontech.com>
1 parent 7a3638a commit a72a304

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

drivers/crypto/loongson/loongson_se_alg_1_1.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,6 @@ static int loongson_sm3_one_request(struct crypto_engine *engine, void *areq)
182182
if (!sae)
183183
return -ENODEV;
184184

185-
if (sae->rctx && sae->rctx != rctx) {
186-
/* Should wait last request done */
187-
crypto_finalize_hash_request(sae->engine, req, -EINPROGRESS);
188-
err = loongson_sm3_enqueue(req, rctx->op);
189-
return err == -EINPROGRESS ? 0 : err;
190-
}
191-
192185
sae->rctx = rctx;
193186
rctx->req = req;
194187

0 commit comments

Comments
 (0)