aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJP Kobryn <inwardvessel@gmail.com>2024-01-05 12:24:01 -0800
committerAndrew Morton <akpm@linux-foundation.org>2024-02-21 16:00:02 -0800
commit3956570ef7776bf19f7dfdf765bbf80fbd244ab9 (patch)
tree0ef9d6f84244a66dfc31400f2c750231c37ededc /scripts
parent6212eb4d7a636bdfe0c11c84aa90db3fb5e6a0ff (diff)
downloadlinux-3956570ef7776bf19f7dfdf765bbf80fbd244ab9.tar.gz
selftests/mm/ksm_functional: prevent unmapping undefined address
Replace some goto statements with return statements so that unmap() is not called on an undefined address. This change is made so that unmap() can only be reached after mmap() is called (and the address mentioned is defined). Returning MAP_FAILED seems acceptable since client code checks for this value. Link: https://lkml.kernel.org/r/20240105202401.28851-1-inwardvessel@gmail.com Fixes: 42096aa24b82 ("selftest/mm: ksm_functional_tests: test in mmap_and_merge_range() if anything got merged") Signed-off-by: JP Kobryn <inwardvessel@gmail.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions