Skip to content

Commit 72d85d9

Browse files
committed
x86/mm/pat: cpa-test: fix length for CPA_ARRAY test
jira LE-4694 Rebuild_History Non-Buildable kernel-6.12.0-55.43.1.el10_0 commit-author Mike Rapoport (Microsoft) <rppt@kernel.org> commit 33ea120 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: ecc729f ("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 (cherry picked from commit 33ea120) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 79906c7 commit 72d85d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/mm/pat/cpa-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static int pageattr_test(void)
183183
break;
184184

185185
case 1:
186-
err = change_page_attr_set(addrs, len[1], PAGE_CPA_TEST, 1);
186+
err = change_page_attr_set(addrs, len[i], PAGE_CPA_TEST, 1);
187187
break;
188188

189189
case 2:

0 commit comments

Comments
 (0)