summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2025-09-13 14:59:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-19 16:32:05 +0200
commit9f4b38ad41d6ebbaeb98a98ec2099451f1623aab (patch)
treef57535fd1ac30a2433ce6f69023c56ea1d48ca00 /mm
parentc95c22402b00f206e1e23332b06324348e350f8f (diff)
downloadlinux-9f4b38ad41d6ebbaeb98a98ec2099451f1623aab.tar.gz
linux-9f4b38ad41d6ebbaeb98a98ec2099451f1623aab.tar.bz2
linux-9f4b38ad41d6ebbaeb98a98ec2099451f1623aab.zip
mm/khugepaged: fix the address passed to notifier on testing young
[ Upstream commit 394bfac1c7f7b701c2c93834c5761b9c9ceeebcf ] Commit 8ee53820edfd ("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: 8ee53820edfd ("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: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/khugepaged.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 63e268c61e82..16d29ee602c7 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1374,8 +1374,8 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm,
*/
if (cc->is_khugepaged &&
(pte_young(pteval) || folio_test_young(folio) ||
- folio_test_referenced(folio) || mmu_notifier_test_young(vma->vm_mm,
- address)))
+ folio_test_referenced(folio) ||
+ mmu_notifier_test_young(vma->vm_mm, _address)))
referenced++;
}
if (!writable) {