Re: [PATCH v1] tools:mm:Check mmap based on return values

2024-08-21 Thread Shuah Khan
On 8/20/24 21:50, Yang Ruibin wrote: To correctly detect whether mmap is successful, must use if (map_ptr == MAP_FAILED)to avoid incorrectly handling a valid mapping. Add "Fix mmap() error paths to check for MAP_FAILED" at the end of the changelog Change short log to say "selftests:mm: Fix mma

[PATCH v1] tools:mm:Check mmap based on return values

2024-08-20 Thread Yang Ruibin
To correctly detect whether mmap is successful, must use if (map_ptr == MAP_FAILED)to avoid incorrectly handling a valid mapping. Signed-off-by: Yang Ruibin <11162...@vivo.com> --- tools/testing/selftests/mm/ksm_tests.c | 2 +- tools/testing/selftests/mm/madv_populate.c | 2 +- tools/testing