Skip to content

Commit eac843f

Browse files
RichardWeiYangUlrich Hecht
authored andcommitted
mm/khugepaged: fix the address passed to notifier on testing young
commit 394bfac1c7f7b701c2c93834c5761b9c9ceeebcf upstream. Commit 8ee5382 ("thp: mmu_notifier_test_young") introduced mmu_notifier_test_young(), but we are passing the wrong address. In xxx_scan_pmd(), the actual iteration address is "_address" not "address". We seem to misuse the variable on the very beginning. Change it to the right one. [akpm@linux-foundation.org fix whitespace, per everyone] Link: https://lkml.kernel.org/r/20250822063318.11644-1-richard.weiyang@gmail.com Fixes: 8ee5382 ("thp: mmu_notifier_test_young") Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Reviewed-by: Dev Jain <dev.jain@arm.com> Reviewed-by: Zi Yan <ziy@nvidia.com> Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Nico Pache <npache@redhat.com> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Barry Song <baohua@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 8824e3f commit eac843f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mm/khugepaged.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ static int khugepaged_scan_pmd(struct mm_struct *mm,
12241224
}
12251225
if (pte_young(pteval) ||
12261226
page_is_young(page) || PageReferenced(page) ||
1227-
mmu_notifier_test_young(vma->vm_mm, address))
1227+
mmu_notifier_test_young(vma->vm_mm, _address))
12281228
referenced++;
12291229
}
12301230
if (writable) {

0 commit comments

Comments
 (0)