From 40fac1a66ccf61bdf3afb70c18a5db7791410b22 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Fri, 6 Jun 2025 16:45:41 +0800 Subject: [PATCH] Revert "tee: optee: interrupt an RPC when supplicant has been killed" This reverts commit e6c7ea7d4da7e43ca05bb2634165e7c143a108ba. Replaced by commit ec18520f5edc ("tee: optee: Fix supplicant wait loop"). Signed-off-by: Tao Huang --- drivers/tee/optee/supp.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/tee/optee/supp.c b/drivers/tee/optee/supp.c index 2d556b79a67e..322a543b8c27 100644 --- a/drivers/tee/optee/supp.c +++ b/drivers/tee/optee/supp.c @@ -82,9 +82,6 @@ u32 optee_supp_thrd_req(struct tee_context *ctx, u32 func, size_t num_params, struct optee_supp_req *req; bool interruptable; u32 ret; - unsigned long timeleft; - int id; - struct optee_supp_req *get_req; /* * Return in case there is no supplicant available and @@ -117,17 +114,8 @@ u32 optee_supp_thrd_req(struct tee_context *ctx, u32 func, size_t num_params, * exclusive access again. */ while (wait_for_completion_interruptible(&req->c)) { - pr_err("Warning, Interrupting an RPC to supplicant!\n"); - timeleft = wait_for_completion_timeout(&req->c, msecs_to_jiffies(2000)); - if (timeleft) { - /* get completion, it means tee-supplicant is alive. */ - break; - } else { - /* timeout, it means tee-supplicant is dead, interrupting an RPC. */ - interruptable = true; - } - mutex_lock(&supp->mutex); + interruptable = !supp->ctx; if (interruptable) { /* * There's no supplicant available and since the @@ -146,14 +134,6 @@ u32 optee_supp_thrd_req(struct tee_context *ctx, u32 func, size_t num_params, list_del(&req->link); req->in_queue = false; } - - idr_for_each_entry(&supp->idr, get_req, id) { - if (get_req == req) { - idr_remove(&supp->idr, id); - supp->req_id = -1; - break; - } - } } mutex_unlock(&supp->mutex);