TODO: get_page()ed pages have to be put_page()ed

The pages which get_page() has been called with should be recorded.
Because these pages have to be passed to put_page()
before they are freed.
This commit is contained in:
NAKAMURA Gou
2014-08-29 20:28:33 +09:00
parent f2e0e42ba4
commit 4177f1c9cd

View File

@ -411,6 +411,12 @@ static int rus_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
page = pfn_to_page(pfn+pix);
if (!page_count(page)) {
get_page(page);
/*
* TODO:
* The pages which get_page() has been called with
* should be recorded. Because these pages have to
* be passed to put_page() before they are freed.
*/
}
error = vm_insert_page(vma, rva+(pix*PAGE_SIZE), page);
if (error) {