From 105fec19d2f5008009504e9e051dc2aec42bd113 Mon Sep 17 00:00:00 2001 From: Zhangfei Gao Date: Tue, 19 Mar 2024 02:40:09 +0000 Subject: [PATCH 20/44] wd_ecc: Fix wd_ecc_uninit re-entry Check status for the re-entry Signed-off-by: Zhangfei Gao --- wd_ecc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wd_ecc.c b/wd_ecc.c index 9aa1519..e75bca0 100644 --- a/wd_ecc.c +++ b/wd_ecc.c @@ -190,6 +190,12 @@ out_clear_ctx_config: static int wd_ecc_common_uninit(void) { + enum wd_status status; + + wd_alg_get_init(&wd_ecc_setting.status, &status); + if (status == WD_UNINIT) + return -WD_EINVAL; + /* uninit async request pool */ wd_uninit_async_request_pool(&wd_ecc_setting.pool); -- 2.25.1