Skip to content

Commit

Permalink
s390/pgtable: Save pgste during modify_prot_start/commit
Browse files Browse the repository at this point in the history
In modify_prot_start we update the pgste value but never store it back
into the original location. Lets save the calculated result, since
modify_prot_commit will use the value of the pgste.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Christian Borntraeger authored and Martin Schwidefsky committed Jun 5, 2013
1 parent 9cc5c20 commit 3a82603
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion arch/s390/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,13 @@ static inline void pgste_set_unlock(pte_t *ptep, pgste_t pgste)
#endif
}

static inline void pgste_set(pte_t *ptep, pgste_t pgste)
{
#ifdef CONFIG_PGSTE
*(pgste_t *)(ptep + PTRS_PER_PTE) = pgste;
#endif
}

static inline pgste_t pgste_update_all(pte_t *ptep, pgste_t pgste)
{
#ifdef CONFIG_PGSTE
Expand Down Expand Up @@ -1101,8 +1108,10 @@ static inline pte_t ptep_modify_prot_start(struct mm_struct *mm,
if (!mm_exclusive(mm))
__ptep_ipte(address, ptep);

if (mm_has_pgste(mm))
if (mm_has_pgste(mm)) {
pgste = pgste_update_all(&pte, pgste);
pgste_set(ptep, pgste);
}
return pte;
}

Expand Down

0 comments on commit 3a82603

Please sign in to comment.