iSulad/0015-driver-do-not-unlock-and-destroy-lock-when-clean-up.patch
Li Feng a1c2183364 iSulad: sync with upstream iSulad
Signed-off-by: Li Feng <lifeng2221dd1@zoho.com.cn>
2021-02-02 15:35:57 +08:00

30 lines
1.2 KiB
Diff

From bba60af5e275a24ab6ae11943ce48ff71524c494 Mon Sep 17 00:00:00 2001
From: Li Feng <lifeng2221dd1@zoho.com.cn>
Date: Mon, 25 Jan 2021 11:31:54 +0800
Subject: [PATCH 15/26] driver: do not unlock and destroy lock when clean up
Signed-off-by: Li Feng <lifeng2221dd1@zoho.com.cn>
---
.../image/oci/storage/layer_store/graphdriver/driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.c b/src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.c
index f2df4f8f..b41132ea 100644
--- a/src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.c
+++ b/src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.c
@@ -517,9 +517,9 @@ int graphdriver_cleanup(void)
g_graphdriver->home = NULL;
free(g_graphdriver->backing_fs);
g_graphdriver->backing_fs = NULL;
- driver_unlock();
- pthread_rwlock_destroy(&(g_graphdriver->rwlock));
g_graphdriver = NULL;
+ // notes, do not driver_unlock and destroy the lock, becase the other threads may wait for it
+ // if we unlock and destroy the lock, may cause the lock failure, and result to coredump
out:
return ret;
--
2.25.1