[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220504153116.059763982@linuxfoundation.org>
Date: Wed, 4 May 2022 18:45:04 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Dongliang Mu <mudongliangabcd@...il.com>,
Jens Wiklander <jens.wiklander@...aro.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.17 066/225] tee: optee: add missing mutext_destroy in optee_ffa_probe
From: Dongliang Mu <mudongliangabcd@...il.com>
[ Upstream commit b5e22886839ae466fcf03295150094516c0fd8eb ]
The error handling code of optee_ffa_probe misses the mutex_destroy of
ffa.mutex when mutext_init succeeds.
Fix this by adding mutex_destory of ffa.mutex at the error handling part
Fixes: aceeafefff73 ("optee: use driver internal tee_context for some rpc")
Signed-off-by: Dongliang Mu <mudongliangabcd@...il.com>
Signed-off-by: Jens Wiklander <jens.wiklander@...aro.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/tee/optee/ffa_abi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
index f744ab15bf2c..30a6119a2b16 100644
--- a/drivers/tee/optee/ffa_abi.c
+++ b/drivers/tee/optee/ffa_abi.c
@@ -894,6 +894,7 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
rhashtable_free_and_destroy(&optee->ffa.global_ids, rh_free_fn, NULL);
optee_supp_uninit(&optee->supp);
mutex_destroy(&optee->call_queue.mutex);
+ mutex_destroy(&optee->ffa.mutex);
err_unreg_supp_teedev:
tee_device_unregister(optee->supp_teedev);
err_unreg_teedev:
--
2.35.1
Powered by blists - more mailing lists