git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7415ad0
)
malloc: fix invalid argument handling
author
Anatoly Burakov
<anatoly.burakov@intel.com>
Mon, 5 Nov 2018 17:26:56 +0000
(17:26 +0000)
committer
Thomas Monjalon
<thomas@monjalon.net>
Tue, 6 Nov 2018 00:13:58 +0000
(
01:13
+0100)
When adding memory to an external heap, do not go to unlock failure
handler because the memory hotplug lock hasn't been taken out yet.
Fixes:
7d75c31014f7
("malloc: allow adding memory to named heaps")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/rte_malloc.c
patch
|
blob
|
history
diff --git
a/lib/librte_eal/common/rte_malloc.c
b/lib/librte_eal/common/rte_malloc.c
index
9e61dc4
..
0da5ad5
100644
(file)
--- a/
lib/librte_eal/common/rte_malloc.c
+++ b/
lib/librte_eal/common/rte_malloc.c
@@
-349,8
+349,7
@@
rte_malloc_heap_memory_add(const char *heap_name, void *va_addr, size_t len,
strnlen(heap_name, RTE_HEAP_NAME_MAX_LEN) ==
RTE_HEAP_NAME_MAX_LEN) {
rte_errno = EINVAL;
- ret = -1;
- goto unlock;
+ return -1;
}
rte_rwlock_write_lock(&mcfg->memory_hotplug_lock);