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 B03802D24AD; Tue, 30 Sep 2025 14:49:21 +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=1759243761; cv=none; b=BVSsd+WdgJgyHHsljAWB3iLuM04URncQOlvrDoyFNyjK+UNLmM9xevc1FHIsVMw3VccZkKrMYk9yQjom1njzHDWcGOUEX5HbqOgkQBmD2sfGJv9yI2MDu906DzyjfsGXojLS0H7FUQJwcJ5g6ilTPmUZ23BiHRek2EwWYdX4K5Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759243761; c=relaxed/simple; bh=3beHunAEKOQnGEDXBMIGKChk3RPQ6wHWWa6sN0vFrno=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D8V/TLBzYIs1LECU2yUGhjzi9jULywz6lxG1GajLVtkvodeP3ITlfdTvq7x2NaK5UT52VPzQy6bQJTxJO7JCWgCG4EwhdeKSLUuomqOV+kElFTBygOPsRyl5ZdjH2TouCD6Ba9z/oMygvoH9+88gf30qkHVurbUVz6ErGilUQk4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=phs1lZbD; 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="phs1lZbD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84676C4CEF0; Tue, 30 Sep 2025 14:49:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759243761; bh=3beHunAEKOQnGEDXBMIGKChk3RPQ6wHWWa6sN0vFrno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=phs1lZbDIrqI4pcrQVil2Jtn6zpK+aF1LADL09dzxesjHKvIyY/if2/we+Bm7+ls3 jFRfU6M2IAlm0v/vxSpEyb1E9Mj9wDrGthdMGaC2mYIxot32buOZn5IFCqcMkNMv7Y TwqfG2CLj97F7E4CDxgi1zBoHZ1zjFkWgzAOvPCA= 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 Subject: [PATCH 5.4 10/81] mm/khugepaged: fix the address passed to notifier on testing young Date: Tue, 30 Sep 2025 16:46:12 +0200 Message-ID: <20250930143820.097612469@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250930143819.654157320@linuxfoundation.org> References: <20250930143819.654157320@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wei Yang commit 394bfac1c7f7b701c2c93834c5761b9c9ceeebcf upstream. 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: Greg Kroah-Hartman --- mm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1227,7 +1227,7 @@ static int khugepaged_scan_pmd(struct mm } if (pte_young(pteval) || page_is_young(page) || PageReferenced(page) || - mmu_notifier_test_young(vma->vm_mm, address)) + mmu_notifier_test_young(vma->vm_mm, _address)) referenced++; } if (writable) {