21/09/2018 13:02, Ilya Maximets: > On 21.09.2018 12:27, Anatoly Burakov wrote: > > When NUMA-aware hugepages config option is set, we rely on > > libnuma to tell the kernel to allocate hugepages on a specific > > NUMA node. However, we allocate node mask before we check if > > NUMA is available in the first place, which, according to > > the manpage [1], causes undefined behaviour. > > > > Fix by only using nodemask when we have NUMA available. > > > > [1] https://linux.die.net/man/3/numa_alloc_onnode > > > > Bugzilla ID: 20 > > > > Fixes: 1b72605d2416 ("mem: balanced allocation of hugepages") > > Cc: i.maxim...@samsung.com > > Cc: sta...@dpdk.org > > > > Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com> > > --- > > > > Notes: > > v3: > > - Fix potential memory leak if socket-mem was not specified > > > > v2: > > - Improve readability as per Ilya's comment > > > > lib/librte_eal/linuxapp/eal/eal_memory.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > LGTM, > Acked-by: Ilya Maximets <i.maxim...@samsung.com>
Applied, thanks