]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/mm/pat: cpa-test: fix length for CPA_ARRAY test
authorMike Rapoport (Microsoft) <rppt@kernel.org>
Sun, 26 Jan 2025 07:47:25 +0000 (09:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:31:57 +0000 (14:31 +0200)
commit990d17f5d35defd5cdf06ab55016740638668fd1
tree8dfe1a4aec73dc98221d3df143fe49c50563ab73
parent471c89b7d4f58bd6082f7c1fe14d4ca15c7f1284
x86/mm/pat: cpa-test: fix length for CPA_ARRAY test

[ 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)" <rppt@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250126074733.1384926-2-rppt@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/mm/pat/cpa-test.c