On 01-Jun-18 1:59 PM, Dariusz Stojaczyk wrote:
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. Changes from v2: * replaced rte_panic() with a CRIT log. * added "git fixline" tags Changes from v1: * checkpatch fixes Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime") Cc: [email protected] Cc: [email protected] Signed-off-by: Dariusz Stojaczyk <[email protected]> ---
Acked-by: Anatoly Burakov <[email protected]> Thomas, could you please fix the commit message on apply? -- Thanks, Anatoly

