Skip to contentSkip to conversation

i386 CPA fix - do not free reserved pages

PATCH New Mathieu Desnoyers 1 participant 1 message Jul 14, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386 CPA fix - do not free reserved pages

i386 CPA fix - do not free reserved pages

We have to use the same conditions found in change_page_attr in global_tlb_flush regarding the conditions that leads to free the page.

It applies to 2.6.22-rc6-mm1 (as it been applied for the next one ?)

---
 arch/i386/mm/pageattr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/i386/mm/pageattr.c +1 -1
Index: linux-2.6-lttng/arch/i386/mm/pageattr.c
===================================================================
@@ -247,7 +247,7 @@
 	list_for_each_entry_safe(pg, next, &l, lru) {
 		clear_bit(PG_arch_1, &pg->flags);
 		list_del(&pg->lru);
-		if (page_private(pg) != 0)
+		if (PageReserved(pg) || !cpu_has_pse || page_private(pg) != 0)
 			continue;
 		ClearPagePrivate(pg);
 		__free_page(pg);
Signature · 3 lines
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68