mem: mark pages as not accessed when freeing memory
Commit8a4baf06c1
("mem: mark pages as not accessed when reserving VA") has mapped the initialized memory with PROT_NONE, and when it's unmapped, eal_memalloc.c should remmap the anonymous memory with PROT_NONE too. Fixes:8a4baf06c1
("mem: mark pages as not accessed when reserving VA") Cc: stable@dpdk.org Signed-off-by: Li Feng <fengli@smartx.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
This commit is contained in:
parent
a9aa14d9aa
commit
76e91e3f14
@ -680,7 +680,7 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
|
|||||||
/* erase page data */
|
/* erase page data */
|
||||||
memset(ms->addr, 0, ms->len);
|
memset(ms->addr, 0, ms->len);
|
||||||
|
|
||||||
if (mmap(ms->addr, ms->len, PROT_READ,
|
if (mmap(ms->addr, ms->len, PROT_NONE,
|
||||||
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0) ==
|
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0) ==
|
||||||
MAP_FAILED) {
|
MAP_FAILED) {
|
||||||
RTE_LOG(DEBUG, EAL, "couldn't unmap page\n");
|
RTE_LOG(DEBUG, EAL, "couldn't unmap page\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user