Skip to content
Commit 53c4ab70 authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

s390: fix alloc_pgste check in init_new_context again



git commit badb8bb9 "fix alloc_pgste check in init_new_context" fixed
the problem of 'current->mm == NULL' in init_new_context back in 2011.

git commit 3eabaee9 "KVM: s390: allow sie enablement for multi-
threaded programs" completely removed the check against alloc_pgste.

git commit 23fefe11 "s390/kvm: avoid global config of vm.alloc_pgste=1"
re-added a check against the alloc_pgste flag but without the required
check for current->mm != NULL.

For execve() called by a kernel thread init_new_context() reads from
((struct mm_struct *) NULL)->context.alloc_pgste to decide between
2K vs 4K page tables. If the bit happens to be set for the init process
it will be created with large page tables. This decision is inherited by
all the children of init, this waste quite some memory.

Re-add the check for 'current->mm != NULL'.

Fixes: 23fefe11 ("s390/kvm: avoid global config of vm.alloc_pgste=1")
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 26f4e759
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment