diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2017-01-23 16:59:44 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-01-24 10:03:42 -0500 |
commit | 0d6da872d3e4a60f43c295386d7ff9a4cdcd57e9 (patch) | |
tree | 671f1c745caebdc216013268da1ddd1690f3f984 | |
parent | 9dce990d2cf57b5ed4e71a9cdbd7eae4335111ff (diff) |
s390/mm: Fix cmma unused transfer from pgste into pte
The last pgtable rework silently disabled the CMMA unused state by
setting a local pte variable (a parameter) instead of propagating it
back into the caller. Fix it.
Fixes: ebde765c0e85 ("s390/mm: uninline ptep_xxx functions from pgtable.h")
Cc: stable@vger.kernel.org # v4.6+
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/mm/pgtable.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 7a1897c51c54..d56ef26d4681 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -202,7 +202,7 @@ static inline pgste_t ptep_xchg_start(struct mm_struct *mm, | |||
202 | return pgste; | 202 | return pgste; |
203 | } | 203 | } |
204 | 204 | ||
205 | static inline void ptep_xchg_commit(struct mm_struct *mm, | 205 | static inline pte_t ptep_xchg_commit(struct mm_struct *mm, |
206 | unsigned long addr, pte_t *ptep, | 206 | unsigned long addr, pte_t *ptep, |
207 | pgste_t pgste, pte_t old, pte_t new) | 207 | pgste_t pgste, pte_t old, pte_t new) |
208 | { | 208 | { |
@@ -220,6 +220,7 @@ static inline void ptep_xchg_commit(struct mm_struct *mm, | |||
220 | } else { | 220 | } else { |
221 | *ptep = new; | 221 | *ptep = new; |
222 | } | 222 | } |
223 | return old; | ||
223 | } | 224 | } |
224 | 225 | ||
225 | pte_t ptep_xchg_direct(struct mm_struct *mm, unsigned long addr, | 226 | pte_t ptep_xchg_direct(struct mm_struct *mm, unsigned long addr, |
@@ -231,7 +232,7 @@ pte_t ptep_xchg_direct(struct mm_struct *mm, unsigned long addr, | |||
231 | preempt_disable(); | 232 | preempt_disable(); |
232 | pgste = ptep_xchg_start(mm, addr, ptep); | 233 | pgste = ptep_xchg_start(mm, addr, ptep); |
233 | old = ptep_flush_direct(mm, addr, ptep); | 234 | old = ptep_flush_direct(mm, addr, ptep); |
234 | ptep_xchg_commit(mm, addr, ptep, pgste, old, new); | 235 | old = ptep_xchg_commit(mm, addr, ptep, pgste, old, new); |
235 | preempt_enable(); | 236 | preempt_enable(); |
236 | return old; | 237 | return old; |
237 | } | 238 | } |
@@ -246,7 +247,7 @@ pte_t ptep_xchg_lazy(struct mm_struct *mm, unsigned long addr, | |||
246 | preempt_disable(); | 247 | preempt_disable(); |
247 | pgste = ptep_xchg_start(mm, addr, ptep); | 248 | pgste = ptep_xchg_start(mm, addr, ptep); |
248 | old = ptep_flush_lazy(mm, addr, ptep); | 249 | old = ptep_flush_lazy(mm, addr, ptep); |
249 | ptep_xchg_commit(mm, addr, ptep, pgste, old, new); | 250 | old = ptep_xchg_commit(mm, addr, ptep, pgste, old, new); |
250 | preempt_enable(); | 251 | preempt_enable(); |
251 | return old; | 252 | return old; |
252 | } | 253 | } |