Skip to content

Commit 5a54b72

Browse files
Huang ShijieAlex Shi
authored andcommitted
arm64: hugetlb: fix the wrong return value for huge_ptep_set_access_flags
In current code, the @Changed always returns the last one's status for the huge page with the contiguous bit set. This is really not what we want. Even one of the PTEs is changed, we should tell it to the caller. This patch fixes this issue. Fixes: 66b3923a1a0f ("arm64: hugetlb: add support for PTE contiguous bit") Cc: <stable@vger.kernel.org> # 4.5.x- Signed-off-by: Huang Shijie <shijie.huang@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> (cherry picked from commit 69d012345a1a32d3f03957f14d972efccc106a98) Signed-off-by: Alex Shi <alex.shi@linaro.org>
1 parent 4fc54a3 commit 5a54b72

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/arm64/mm/hugetlbpage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma,
239239
ncontig = find_num_contig(vma->vm_mm, addr, cpte,
240240
*cpte, &pgsize);
241241
for (i = 0; i < ncontig; ++i, ++cpte, addr += pgsize) {
242-
changed = ptep_set_access_flags(vma, addr, cpte,
242+
changed |= ptep_set_access_flags(vma, addr, cpte,
243243
pfn_pte(pfn,
244244
hugeprot),
245245
dirty);

0 commit comments

Comments
 (0)