]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "selftest/vm: verify mmap addr in mremap_test"
authorOleksandr Tymoshenko <ovt@google.com>
Fri, 15 Jul 2022 23:15:42 +0000 (23:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:06 +0000 (17:25 +0200)
This reverts commit bcdc56f62c7a34f1a2a7fb74b19d3a6a32586e10.

The upstream commit 647e4b92e765 ("selftest/vm: verify mmap addr in
mremap_test") was backported as commit 122a06831484 ("selftest/vm:
verify mmap addr in mremap_test"). Repeated backport introduced the
duplicate of function get_mmap_min_addr to the file breakign the vm
selftest build.

Fixes: bcdc56f62c7a ("selftest/vm: verify mmap addr in mremap_test")
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/vm/mremap_test.c

index efcbf537b3d575ebe496d9d5daa114f5ab45a7f0..e3ce33a9954ea94ef04a033d159064016810e56c 100644 (file)
@@ -66,35 +66,6 @@ enum {
        .expect_failure = should_fail                           \
 }
 
-/* Returns mmap_min_addr sysctl tunable from procfs */
-static unsigned long long get_mmap_min_addr(void)
-{
-       FILE *fp;
-       int n_matched;
-       static unsigned long long addr;
-
-       if (addr)
-               return addr;
-
-       fp = fopen("/proc/sys/vm/mmap_min_addr", "r");
-       if (fp == NULL) {
-               ksft_print_msg("Failed to open /proc/sys/vm/mmap_min_addr: %s\n",
-                       strerror(errno));
-               exit(KSFT_SKIP);
-       }
-
-       n_matched = fscanf(fp, "%llu", &addr);
-       if (n_matched != 1) {
-               ksft_print_msg("Failed to read /proc/sys/vm/mmap_min_addr: %s\n",
-                       strerror(errno));
-               fclose(fp);
-               exit(KSFT_SKIP);
-       }
-
-       fclose(fp);
-       return addr;
-}
-
 /*
  * Returns false if the requested remap region overlaps with an
  * existing mapping (e.g text, stack) else returns true.