summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHongfu Li <lihongfu@kylinos.cn>2026-05-12 13:13:05 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-06-03 01:22:10 +0300
commit2b117897d5c7c5ffdaca3ea40aa7658c54ae7cb8 (patch)
treee2e04f60090973ca589420db662aa527930866e7 /include
parentce872d5a5955bc0e8a9f5c7d3fad85212c13030d (diff)
downloadlinux-2b117897d5c7c5ffdaca3ea40aa7658c54ae7cb8.tar.xz
selftests/mm: fix mmap() return value check in run_migration_benchmark
mmap() returns MAP_FAILED on error, not NULL. The current check uses !buffer->ptr, which evaluates to false when mmap() fails (since MAP_FAILED is (void *)-1, not 0), so the error path is never taken. Link: https://lore.kernel.org/20260512101305.139509-1-lihongfu@kylinos.cn Signed-off-by: Hongfu Li <lihongfu@kylinos.cn> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Reviewed-by: Dev Jain <dev.jain@arm.com> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Reviewed-by: Donet Tom <donettom@linux.ibm.com> Reviewed-by: Lorenzo Stoakes <ljs@kernel.org> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions