From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA3E8332A32; Wed, 17 Sep 2025 12:56:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758113803; cv=none; b=Cp4bOVe7CSLAQPooHS+NDI/dI/8GghywNjsprHPcFYsvk04cxLX4U7KVTQOU985+/v+7w5cJF6zVP+D+q5+6SsOTT+Zi/O5l1vqZ8z398jfGu03A15Zz3+8b5gaH9r5gzNiUTYzcb1gCF9Iaiz2BUj5mIo/7ORs/js2SU67OQsQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758113803; c=relaxed/simple; bh=Q5PicojlcyM5HM2+Nl4zGFVkYdQ6l0NJ/QgJrCSxelA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b0kcyzRhbqhS5SUjH/WU6LQkavCTtgoHMRNc2kFpxVh3QXuGlkEX88rUw3vVp0E5cWX5ZfeBecPAoc1mOMJgtULMRQDs8Sni+VicChuSMLZbK0+CNDctW7M9qZV3I90onVNAWBgxOupby7loRVvknw4CQF6gPVJxW/jhnelf8UE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Jrs2lA7w; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Jrs2lA7w" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A8E1C4CEF0; Wed, 17 Sep 2025 12:56:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758113802; bh=Q5PicojlcyM5HM2+Nl4zGFVkYdQ6l0NJ/QgJrCSxelA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jrs2lA7wMsCF003ZlnNRKU6dzVPyB623KDHoVGX4Ls0k8gEVoU4GXQrGcuml069TR nhUsMFCFQq4PZ5wo9q9THpl/egT0x2sKEq6Gu2lD3Qf9YSmzEbZwwwjLvDjurJ/6HC tFdvvOjxDuYX92AFhzPPeSPFInY6kDnSAAzghyCk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wei Yang , Dev Jain , Zi Yan , David Hildenbrand , Lorenzo Stoakes , Baolin Wang , "Liam R. Howlett" , Nico Pache , Ryan Roberts , Barry Song , Andrew Morton , Sasha Levin Subject: [PATCH 6.6 056/101] mm/khugepaged: fix the address passed to notifier on testing young Date: Wed, 17 Sep 2025 14:34:39 +0200 Message-ID: <20250917123338.196916128@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250917123336.863698492@linuxfoundation.org> References: <20250917123336.863698492@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wei Yang [ 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 Reviewed-by: Dev Jain Reviewed-by: Zi Yan Acked-by: David Hildenbrand Reviewed-by: Lorenzo Stoakes Cc: Baolin Wang Cc: Liam R. Howlett Cc: Nico Pache Cc: Ryan Roberts Cc: Barry Song Cc: Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- mm/khugepaged.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1374,8 +1374,8 @@ static int hpage_collapse_scan_pmd(struc */ 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) {