Re: having problems with remap_page_range() and virt_to_phys()

From: Chris Friesen
Date: Fri Sep 10 2004 - 16:40:00 EST


Hugh Dickins wrote:

And no, remembering your earlier pleas, the MM system doesn't clean
up for you, you'll need to ClearPageReserved and free the page when
it's all done with (if ever).


Cleanup will be at process death, so I'm adding a routine to be called from do_exit().

As part of that cleanup, do I need to call do_munmap() on the user virtual address first, or can I just do

ClearPageReserved(pg);
__free_pages(pg,0);

and then rely on the mm takedown to properly unmap and drop its references?

Basically I'm not sure if I can clear the reservation and free the page while it's still mapped in the task's memory map.

Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/