[dpdk-dev] [PATCH] eal: fix unlock in rte_eal_memzone_init
gfree.wind at vip.163.com
gfree.wind at vip.163.com
Thu Dec 6 01:47:31 CET 2018
From: Gao Feng <davidfgao at tencent.com>
The RTE_PROC_PRIMARY error handler lost the unlock statement in the
current codes. Now fix it.
Signed-off-by: Gao Feng <davidfgao at tencent.com>
---
lib/librte_eal/common/eal_common_memzone.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c
index b7081af..649cad4 100644
--- a/lib/librte_eal/common/eal_common_memzone.c
+++ b/lib/librte_eal/common/eal_common_memzone.c
@@ -375,6 +375,7 @@
rte_fbarray_init(&mcfg->memzones, "memzone",
RTE_MAX_MEMZONE, sizeof(struct rte_memzone))) {
RTE_LOG(ERR, EAL, "Cannot allocate memzone list\n");
+ rte_rwlock_write_unlock(&mcfg->mlock);
return -1;
} else if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
rte_fbarray_attach(&mcfg->memzones)) {
--
1.8.3.1
More information about the dev
mailing list