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 ?)

Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]>
CC: Andi Kleen <[EMAIL PROTECTED]>
---
 arch/i386/mm/pageattr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-lttng/arch/i386/mm/pageattr.c
===================================================================
--- linux-2.6-lttng.orig/arch/i386/mm/pageattr.c        2007-07-03 
13:25:48.000000000 -0400
+++ linux-2.6-lttng/arch/i386/mm/pageattr.c     2007-07-03 13:28:34.000000000 
-0400
@@ -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);

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to