Commit 7524af98 authored by Russell King's avatar Russell King

[ARM] Prevent oops in free_pages() when freeing a pgd

free_pages() oopses if page->mapping is non-NULL.  Ensure that any
rmap datastructures for the page are freed before freeing the
concerned page.
parent c1759992
......@@ -17,6 +17,7 @@
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
#include <asm/page.h>
#include <asm/rmap.h>
#include <asm/io.h>
#include <asm/setup.h>
......@@ -149,6 +150,7 @@ void free_pgd_slow(pgd_t *pgd)
pte = pmd_page(*pmd);
pmd_clear(pmd);
pgtable_remove_rmap(pte);
pte_free(pte);
pmd_free(pmd);
free:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment