patch-1.3.49 linux/mm/memory.c

Next file: linux/CREDITS
Previous file: linux/kernel/ksyms.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.48/linux/mm/memory.c linux/mm/memory.c
@@ -309,9 +309,10 @@
 	if (pte_none(page))
 		return;
 	if (pte_present(page)) {
-		free_page(pte_page(page));
-		if (mem_map[MAP_NR(pte_page(page))].reserved)
+		unsigned long addr = pte_page(page);
+		if (addr >= high_memory || mem_map[MAP_NR(addr)].reserved)
 			return;
+		free_page(addr);
 		if (current->mm->rss <= 0)
 			return;
 		current->mm->rss--;


FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this