Commit:     421d99193537a6522aac2148286f08792167d5fd
Parent:     3811dbf67162bd08412f1b0e02e554f353e93bdb
Author:     Christoph Lameter <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 17 16:20:27 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Dec 17 19:28:17 2007 -0800

    quicklist: Set tlb->need_flush if pages are remaining in quicklist 0
    This ensures that the quicklists are drained. Otherwise draining may only
    occur when the processor reaches an idle state.
    Fixes fatal leakage of pgd_t's on 2.6.22 and later.
    Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
    Reported-by: Dhaval Giani <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 include/asm-generic/tlb.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index f490e43..799307e 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -14,6 +14,7 @@
 #define _ASM_GENERIC__TLB_H
 #include <linux/swap.h>
+#include <linux/quicklist.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
@@ -85,6 +86,9 @@ tlb_flush_mmu(struct mmu_gather *tlb, unsigned long start, 
unsigned long end)
 static inline void
 tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
+       tlb->need_flush += &__get_cpu_var(quicklist)[0].nr_pages != 0;
        tlb_flush_mmu(tlb, start, end);
        /* keep the page table cache within bounds */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to