Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b89ede6 authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

s390/mm: fork vs. 5 level page tabel



The mm->context.asce field of a new process is not set up correctly
in case of a fork with a 5 level page table.
Add the missing case to init_new_context().

Fixes: 1aea9b3f ("s390/mm: implement 5 level pages tables")
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 42ff72cf
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -44,6 +44,11 @@ static inline int init_new_context(struct task_struct *tsk,
		mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH |
				   _ASCE_USER_BITS | _ASCE_TYPE_REGION3;
		break;
	case -PAGE_SIZE:
		/* forked 5-level task, set new asce with new_mm->pgd */
		mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH |
			_ASCE_USER_BITS | _ASCE_TYPE_REGION1;
		break;
	case 1UL << 53:
		/* forked 4-level task, set new asce with new mm->pgd */
		mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH |