diff options
author | Oleksandr Tymoshenko <ovt@google.com> | 2022-07-15 23:15:41 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-29 17:25:06 +0200 |
commit | cfd3a9be0ac423be41afcc7a07d708056bf097a8 (patch) | |
tree | eaa275d7fa35cf43b0128e338db4c6a3e903e450 /tools/testing | |
parent | d7c4f9b8ed62d5e3b1e1e7c520b16567084c8800 (diff) | |
download | linux-stable-cfd3a9be0ac423be41afcc7a07d708056bf097a8.tar.gz linux-stable-cfd3a9be0ac423be41afcc7a07d708056bf097a8.tar.bz2 linux-stable-cfd3a9be0ac423be41afcc7a07d708056bf097a8.zip |
Revert "selftest/vm: verify remap destination address in mremap_test"
This reverts commit 0b4e16093e081a3ab08b0d6cedf79b249f41b248.
The upstream commit 18d609daa546 ("selftest/vm: verify remap destination
address in mremap_test") was backported as commit 2688d967ec65
("selftest/vm: verify remap destination address in mremap_test").
Repeated backport introduced the duplicate of function
is_remap_region_valid to the file breakign the vm selftest build.
Fixes: 0b4e16093e08 ("selftest/vm: verify remap destination address in mremap_test")
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/vm/mremap_test.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tools/testing/selftests/vm/mremap_test.c b/tools/testing/selftests/vm/mremap_test.c index 8f4dbbd60c09..efcbf537b3d5 100644 --- a/tools/testing/selftests/vm/mremap_test.c +++ b/tools/testing/selftests/vm/mremap_test.c @@ -66,30 +66,6 @@ enum { .expect_failure = should_fail \ } -/* - * Returns false if the requested remap region overlaps with an - * existing mapping (e.g text, stack) else returns true. - */ -static bool is_remap_region_valid(void *addr, unsigned long long size) -{ - void *remap_addr = NULL; - bool ret = true; - - /* Use MAP_FIXED_NOREPLACE flag to ensure region is not mapped */ - remap_addr = mmap(addr, size, PROT_READ | PROT_WRITE, - MAP_FIXED_NOREPLACE | MAP_ANONYMOUS | MAP_SHARED, - -1, 0); - - if (remap_addr == MAP_FAILED) { - if (errno == EEXIST) - ret = false; - } else { - munmap(remap_addr, size); - } - - return ret; -} - /* Returns mmap_min_addr sysctl tunable from procfs */ static unsigned long long get_mmap_min_addr(void) { |