Fix deadlock issue 81/320181/1
authorHwankyu Jhun <h.jhun@samsung.com>
Sat, 9 Nov 2024 03:17:32 +0000 (12:17 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Sat, 9 Nov 2024 03:17:32 +0000 (12:17 +0900)
While calling CheckAsync(), locking the mutex causes the deadlock issue.
This patch removes locking the mutex to avoid deadlock issue.

Change-Id: I8c6e26478d689f84667c2e13c2058fb4e441c4c7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/rpc-port/ac-internal.cc

index de5603040091767b6b5bf3c82384bd05753a145c..23b4b998ecf5d4f1158b8648380662da95136a91 100644 (file)
@@ -186,7 +186,6 @@ int AccessController::Check(int fd, const std::string& sender_appid) {
 
 void AccessController::CheckAsync(int fd, std::string sender_appid,
                                   CompleteCallback callback) {
-  std::lock_guard<std::recursive_mutex> lock(GetMutex());
   auto* tmp_handle = new std::shared_ptr<AccessController>(shared_from_this());
   GMainContext* context = g_main_context_ref_thread_default();
   auto job = std::make_shared<Job>([=] {