summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/mmu.h
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2008-10-28 11:10:15 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-10-28 11:12:03 +0100
commit250cf776f74b5932a1977d0489cae9206e2351dd (patch)
tree71bb6778e65e8efbdd0cac09a64e4e1194b98c3f /arch/s390/include/asm/mmu.h
parent2c78091405d6f54748b1fac78c45f2a799e3073a (diff)
downloadlinux-250cf776f74b5932a1977d0489cae9206e2351dd.tar.gz
linux-250cf776f74b5932a1977d0489cae9206e2351dd.tar.bz2
linux-250cf776f74b5932a1977d0489cae9206e2351dd.zip
[S390] pgtables: Fix race in enable_sie vs. page table ops
The current enable_sie code sets the mm->context.pgstes bit to tell dup_mm that the new mm should have extended page tables. This bit is also used by the s390 specific page table primitives to decide about the page table layout - which means context.pgstes has two meanings. This can cause any kind of bugs. For example - e.g. shrink_zone can call ptep_clear_flush_young while enable_sie is running. ptep_clear_flush_young will test for context.pgstes. Since enable_sie changed that value of the old struct mm without changing the page table layout ptep_clear_flush_young will do the wrong thing. The solution is to split pgstes into two bits - one for the allocation - one for the current state Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/mmu.h')
-rw-r--r--arch/s390/include/asm/mmu.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/include/asm/mmu.h b/arch/s390/include/asm/mmu.h
index 5dd5e7b3476f..d2b4ff831477 100644
--- a/arch/s390/include/asm/mmu.h
+++ b/arch/s390/include/asm/mmu.h
@@ -7,7 +7,8 @@ typedef struct {
unsigned long asce_bits;
unsigned long asce_limit;
int noexec;
- int pgstes;
+ int has_pgste; /* The mmu context has extended page tables */
+ int alloc_pgste; /* cloned contexts will have extended page tables */
} mm_context_t;
#endif