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 CDB48268C72; Tue, 8 Apr 2025 11:05:47 +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=1744110347; cv=none; b=LFDNl7zGviwj3RpRGDGxp4i7mWmCwKDWS38NyYyFgUHTvN40v5J1SWq1YJw7u9DScX33IWBcOJy4LarmNg50Px+jv0QJLNprJLX227hC4cup99Wzn8v+zvfU2lzcVYA+0yzVIHiOpkRE79hswrpo21avQ5+uGiMDVoEqISPW9tg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744110347; c=relaxed/simple; bh=tz12KKTAs7cXXmBCHKsiaZ354ohrfwpdAr/SWHVhl24=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AvIrNTFroKEQEuw1p1y/P4oNqhcat5ITnRakveV+teYci5U18vsoEBIbC2lDbgx+hjzUCEQukbKpUxYdSgvXawrRrAYRwl4E0HkG6zX3SChhkZohKxZcB40S3X6M1mJU0I32F5xAKbJezykcgRrqZ2gBslhvkyUC8LMcv0rf+1Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eiytQLSa; 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="eiytQLSa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5512AC4CEE5; Tue, 8 Apr 2025 11:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744110347; bh=tz12KKTAs7cXXmBCHKsiaZ354ohrfwpdAr/SWHVhl24=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eiytQLSaAecRetKkJ69+DB7xiF/xpGT/y9xPd8g4BZ8JCYNCksPoAetWfFY2QgYre m8x/nWsRHtse44PHDMheLCb/mu7loEZVh0GHDzIxpeQl6yqXIF1ad3OnIpiJD9LVb7 seOlyfYwXx94QdqSj0Qz8g33ZNl8SHux2HgQ80oA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Mike Rapoport (Microsoft)" , "Peter Zijlstra (Intel)" , Sasha Levin Subject: [PATCH 6.14 003/731] x86/mm/pat: cpa-test: fix length for CPA_ARRAY test Date: Tue, 8 Apr 2025 12:38:20 +0200 Message-ID: <20250408104914.338141786@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104914.247897328@linuxfoundation.org> References: <20250408104914.247897328@linuxfoundation.org> User-Agent: quilt/0.68 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 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mike Rapoport (Microsoft) [ Upstream commit 33ea120582a638b2f2e380a50686c2b1d7cce795 ] The CPA_ARRAY test always uses len[1] as numpages argument to change_page_attr_set() although the addresses array is different each iteration of the test loop. Replace len[1] with len[i] to have numpages matching the addresses array. Fixes: ecc729f1f471 ("x86/mm/cpa: Add ARRAY and PAGES_ARRAY selftests") Signed-off-by: "Mike Rapoport (Microsoft)" Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250126074733.1384926-2-rppt@kernel.org Signed-off-by: Sasha Levin --- arch/x86/mm/pat/cpa-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/mm/pat/cpa-test.c b/arch/x86/mm/pat/cpa-test.c index 3d2f7f0a6ed14..ad3c1feec990d 100644 --- a/arch/x86/mm/pat/cpa-test.c +++ b/arch/x86/mm/pat/cpa-test.c @@ -183,7 +183,7 @@ static int pageattr_test(void) break; case 1: - err = change_page_attr_set(addrs, len[1], PAGE_CPA_TEST, 1); + err = change_page_attr_set(addrs, len[i], PAGE_CPA_TEST, 1); break; case 2: -- 2.39.5