numam-dpdk/lib/librte_eal
Anatoly Burakov 7e54f18326 mem: fix deadlock on secondary allocation
Previous fix used `rte_malloc_heap_socket_is_external()` to check if the
heap was an external heap. However, that API is thread-safe, and when
we're inside the allocation process, we're already write-locked, so
calling `rte_malloc_heap_socket_is_external()` will result in a
deadlock followed by a timeout.

Fix it by replacing the API call with a check against maximum number of
NUMA nodes, because external heaps always have higher socket ID's.

Fixes: 7ac31e82bc ("mem: improve parameter checking on memory hotplug")

Reported-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2021-01-30 00:26:49 +01:00
..
arm eal/arm: fix debug build with gcc for 128-bit atomics 2021-01-27 11:21:21 +01:00
common mem: fix deadlock on secondary allocation 2021-01-30 00:26:49 +01:00
freebsd service: propagate init error in EAL 2021-01-15 16:32:19 +01:00
include build: add header includes check 2021-01-29 20:59:37 +01:00
linux eal/linux: improve no hugepages logging 2021-01-19 13:12:59 +01:00
ppc eal: add monitor wakeup function 2021-01-18 23:59:42 +01:00
unix eal: add generic thread-local-storage functions 2021-01-11 23:28:12 +01:00
windows eal/windows: fix C++ compatibility 2021-01-17 18:27:48 +01:00
x86 build: add header includes check 2021-01-29 20:59:37 +01:00
meson.build eal/windows: use bundled getopt with MinGW 2020-10-05 09:12:24 +02:00
rte_eal_exports.def eal/windows: build reciprocal division functions 2021-01-15 15:04:03 +01:00
version.map eal: add monitor wakeup function 2021-01-18 23:59:42 +01:00