mm: Fix alloc to physical bad page retry
authorJack Miller <jack@codezen.org>
Fri, 17 Feb 2017 23:30:27 +0000 (17:30 -0600)
committerJack Miller <jack@codezen.org>
Fri, 12 Apr 2019 17:04:07 +0000 (12:04 -0500)
mm/page_alloc.c

index 77721d5..bcdc4e8 100644 (file)
@@ -277,7 +277,7 @@ void *page_alloc_to_virtual(u64 virtual, u32 order)
             if(__clear_page((void *) cur_page)) {
                 unmap_pages(virtual, (1 << order));
                 page_alloc_free_phys(physical);
-                __reserve_region(cur_page, 1);
+                __reserve_region(physical, 1);
 
                 try_again = 1;
                 break;