]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[S390] fix alloc_pgste check in init_new_context
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 10 May 2011 15:13:43 +0000 (17:13 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Tue, 10 May 2011 15:13:43 +0000 (17:13 +0200)
Processes started with kernel_execve from a kernel thread will have
current->mm==NULL. Reading current->mm->context.alloc_pgste will
read a more or less random bit from lowcore in this case. If the
bit turns out to be set the whole process tree started this way
will allocate page table extensions although they have no need
for it.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/mmu_context.h

index a6f0e7cc9cde2f341fba3fef347ea93240bb9372..8c277caa8d3aa81d0d8f14c28b2e71f12ec3e791 100644 (file)
@@ -23,7 +23,7 @@ static inline int init_new_context(struct task_struct *tsk,
 #ifdef CONFIG_64BIT
        mm->context.asce_bits |= _ASCE_TYPE_REGION3;
 #endif
-       if (current->mm->context.alloc_pgste) {
+       if (current->mm && current->mm->context.alloc_pgste) {
                /*
                 * alloc_pgste indicates, that any NEW context will be created
                 * with extended page tables. The old context is unchanged. The