memzone: check NUMA id when reserving a zone
authorTonghao Zhang <nic@opencloud.tech>
Fri, 12 May 2017 06:03:43 +0000 (23:03 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 5 Jun 2017 16:23:34 +0000 (18:23 +0200)
If the socket_id is invalid (e.g. -2, -3), the
memzone_reserve_aligned_thread_unsafe should return the
EINVAL and not ENOMEM. To avoid it, we should check the
socket_id before calling malloc_heap_alloc.

Signed-off-by: Tonghao Zhang <nic@opencloud.tech>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

No differences found