Skip to content

Commit fd714c9

Browse files
RichardWeiYanggregkh
authored andcommitted
mm/khugepaged: fix the address passed to notifier on testing young
commit 394bfac 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. [[email protected] fix whitespace, per everyone] Link: https://lkml.kernel.org/r/[email protected] Fixes: 8ee5382 ("thp: mmu_notifier_test_young") Signed-off-by: Wei Yang <[email protected]> Reviewed-by: Dev Jain <[email protected]> Reviewed-by: Zi Yan <[email protected]> Acked-by: David Hildenbrand <[email protected]> Reviewed-by: Lorenzo Stoakes <[email protected]> Cc: Baolin Wang <[email protected]> Cc: Liam R. Howlett <[email protected]> Cc: Nico Pache <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Barry Song <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 532b876 commit fd714c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/khugepaged.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,8 +1403,8 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm,
14031403
*/
14041404
if (cc->is_khugepaged &&
14051405
(pte_young(pteval) || folio_test_young(folio) ||
1406-
folio_test_referenced(folio) || mmu_notifier_test_young(vma->vm_mm,
1407-
address)))
1406+
folio_test_referenced(folio) ||
1407+
mmu_notifier_test_young(vma->vm_mm, _address)))
14081408
referenced++;
14091409
}
14101410
if (!writable) {

0 commit comments

Comments
 (0)