fix release leakage of extra pages

This commit is contained in:
NAKAMURA Gou
2013-05-28 11:01:52 +09:00
parent fa1be382c7
commit 0b97235b9f

View File

@ -349,6 +349,9 @@ unsigned long extend_process_region(struct process *proc,
if (p_aligned > (unsigned long)p) {
free_pages(p, (p_aligned - (unsigned long)p) >> PAGE_SHIFT);
}
free_pages(
(void *)(p_aligned + aligned_new_end - aligned_end),
(LARGE_PAGE_SIZE - (p_aligned - (unsigned long)p)) >> PAGE_SHIFT);
add_process_memory_range(proc, aligned_end, aligned_new_end,
virt_to_phys((void *)p_aligned), flag);