Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/mm/pat: cpa-test: fix length for CPA_ARRAY test

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

authored by

Mike Rapoport (Microsoft) and committed by
Peter Zijlstra
33ea1205 2014c95a

+1 -1
+1 -1
arch/x86/mm/pat/cpa-test.c
··· 183 183 break; 184 184 185 185 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); 187 187 break; 188 188 189 189 case 2: