* Patch "arm64: hugetlb: fix the wrong address for several functions" has been added to the 4.9-stable tree
@ 2017-01-18 7:26 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-18 7:26 UTC (permalink / raw)
To: shijie.huang, catalin.marinas, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
arm64: hugetlb: fix the wrong address for several functions
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
arm64-hugetlb-fix-the-wrong-address-for-several-functions.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 0c2f0afe3582c58efeef93bc57bc07d502132618 Mon Sep 17 00:00:00 2001
From: Huang Shijie <shijie.huang@arm.com>
Date: Tue, 8 Nov 2016 13:44:39 +0800
Subject: arm64: hugetlb: fix the wrong address for several functions
From: Huang Shijie <shijie.huang@arm.com>
commit 0c2f0afe3582c58efeef93bc57bc07d502132618 upstream.
The libhugetlbfs meets several failures since the following functions
do not use the correct address:
huge_ptep_get_and_clear()
huge_ptep_set_access_flags()
huge_ptep_set_wrprotect()
huge_ptep_clear_flush()
This patch fixes the wrong address for them.
Signed-off-by: Huang Shijie <shijie.huang@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/mm/hugetlbpage.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/arch/arm64/mm/hugetlbpage.c
+++ b/arch/arm64/mm/hugetlbpage.c
@@ -212,7 +212,7 @@ pte_t huge_ptep_get_and_clear(struct mm_
ncontig = find_num_contig(mm, addr, cpte, *cpte, &pgsize);
/* save the 1st pte to return */
pte = ptep_get_and_clear(mm, addr, cpte);
- for (i = 1; i < ncontig; ++i) {
+ for (i = 1, addr += pgsize; i < ncontig; ++i, addr += pgsize) {
/*
* If HW_AFDBM is enabled, then the HW could
* turn on the dirty bit for any of the page
@@ -250,7 +250,7 @@ int huge_ptep_set_access_flags(struct vm
pfn = pte_pfn(*cpte);
ncontig = find_num_contig(vma->vm_mm, addr, cpte,
*cpte, &pgsize);
- for (i = 0; i < ncontig; ++i, ++cpte) {
+ for (i = 0; i < ncontig; ++i, ++cpte, addr += pgsize) {
changed = ptep_set_access_flags(vma, addr, cpte,
pfn_pte(pfn,
hugeprot),
@@ -273,7 +273,7 @@ void huge_ptep_set_wrprotect(struct mm_s
cpte = huge_pte_offset(mm, addr);
ncontig = find_num_contig(mm, addr, cpte, *cpte, &pgsize);
- for (i = 0; i < ncontig; ++i, ++cpte)
+ for (i = 0; i < ncontig; ++i, ++cpte, addr += pgsize)
ptep_set_wrprotect(mm, addr, cpte);
} else {
ptep_set_wrprotect(mm, addr, ptep);
@@ -291,7 +291,7 @@ void huge_ptep_clear_flush(struct vm_are
cpte = huge_pte_offset(vma->vm_mm, addr);
ncontig = find_num_contig(vma->vm_mm, addr, cpte,
*cpte, &pgsize);
- for (i = 0; i < ncontig; ++i, ++cpte)
+ for (i = 0; i < ncontig; ++i, ++cpte, addr += pgsize)
ptep_clear_flush(vma, addr, cpte);
} else {
ptep_clear_flush(vma, addr, ptep);
Patches currently in stable-queue which might be from shijie.huang@arm.com are
queue-4.9/arm64-hugetlb-fix-the-wrong-address-for-several-functions.patch
queue-4.9/arm64-hugetlb-remove-the-wrong-pmd-check-in-find_num_contig.patch
queue-4.9/arm64-hugetlb-fix-the-wrong-return-value-for-huge_ptep_set_access_flags.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-18 7:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 7:26 Patch "arm64: hugetlb: fix the wrong address for several functions" has been added to the 4.9-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.