1 Star 0 Fork 76

wzc_1024/dpdk_src_openEuler

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0013-fix-rte-eal-memory-init-double-unlock.patch 1018 Bytes
一键复制 编辑 原始数据 按行查看 历史
吴昌盛 提交于 2021-12-25 17:37 . add gazelle support
From d9e578c64144bf35e3141d2a3f3ada2763534cb2 Mon Sep 17 00:00:00 2001
From: Changsheng Wu <[email protected]>
Date: Thu, 16 Dec 2021 19:26:51 +0800
Subject: [PATCH] huawei-0015-fix-rte-eal-memory-init-double-unlock
---
lib/eal/common/eal_common_memory.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c
index 15ce4341b0..d983e37cc8 100644
--- a/lib/eal/common/eal_common_memory.c
+++ b/lib/eal/common/eal_common_memory.c
@@ -1150,8 +1150,10 @@ rte_eal_sec_memory_init(const int sec_idx)
ret = __rte_eal_memory_init(rte_eal_sec_get_runtime_dir(sec_idx),
rte_eal_sec_get_internal_config(sec_idx), rte_cfg,
true, sec_idx);
-
- rte_rwlock_read_unlock(&rte_cfg->mem_config->memory_hotplug_lock);
+ if (ret == 0) {
+ /* when ret != 0 unlock in __rte_eal_memory_init */
+ rte_rwlock_read_unlock(&rte_cfg->mem_config->memory_hotplug_lock);
+ }
return ret;
}
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wzc_1024/dpdk_openEuler.git
[email protected]:wzc_1024/dpdk_openEuler.git
wzc_1024
dpdk_openEuler
dpdk_src_openEuler
master

搜索帮助