Title: [9155] trunk/arch/blackfin/mm/init.c: Fix bug[#6254] [#5805] access_ok: extend memory start to cover init memory
Revision
9155
Author
sonicz
Date
2010-09-20 07:06:18 -0400 (Mon, 20 Sep 2010)

Log Message

Fix bug[#6254] [#5805] access_ok: extend memory start to cover init memory

Instead of change logic of access_ok to check memory region across the
init memory and generic allocable memory border, extend the start
address of generic allocable memory to cover the adjacent init memory
after init memory region is freed.

Modified Paths

Diff

Modified: trunk/arch/blackfin/mm/init.c (9154 => 9155)


--- trunk/arch/blackfin/mm/init.c	2010-09-20 08:58:24 UTC (rev 9154)
+++ trunk/arch/blackfin/mm/init.c	2010-09-20 11:06:18 UTC (rev 9155)
@@ -134,7 +134,7 @@
 {
 	unsigned long addr;
 	/* next to check that the page we free is not a partial page */
-	for (addr = begin; addr + PAGE_SIZE <= end; addr += PAGE_SIZE) {
+	for (addr = begin; addr + PAGE_SIZE < end; addr += PAGE_SIZE) {
 		ClearPageReserved(virt_to_page(addr));
 		init_page_count(virt_to_page(addr));
 		free_page(addr);
@@ -158,5 +158,8 @@
 	free_init_pages("unused kernel memory",
 			(unsigned long)(&__init_begin),
 			(unsigned long)(&__init_end));
+
+	if (memory_start == __init_end)
+		memory_start = __init_begin;
 #endif
 }
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to