On 1/7/26 17:48, Kevin Brodsky wrote:
One of the pagemap_ioctl tests attempts to fault in pages by
memcpy()'ing them to an unused buffer. This probably worked
originally, but since commit 46036188ea1f ("selftests/mm: build with
-O2") the compiler is free to optimise away that unused buffer and
the memcpy() with it. As a result there might not be any resident
page in the mapping and the test may fail.
Yes, I assume so. Using FORCE_READ() etc is the way to go.
Should we add
Fixes: 46036188ea1f ("selftests/mm: build with -O2")
?
Acked-by: David Hildenbrand (Red Hat) <[email protected]>
--
Cheers
David