637175ab95
EAL reserves a huge area in virtual address space to provide virtual address contiguity for e.g. future memory extensions (memory hotplug). During memory hotplug, if the hugepage mmap succeeds but doesn't suffice EAL's requiriments, the EAL would unmap this mapping straight away, leaving a hole in its virtual memory area and making it available to everyone. As EAL still thinks it owns the entire region, it may try to mmap it later with MAP_FIXED, possibly overriding a user's mapping that was made in the meantime. This patch ensures each hole is mapped back by EAL, so that it won't be available to anyone else. Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime") Cc: stable@dpdk.org Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>