All of lore.kernel.org
 help / color / mirror / Atom feed
* + selftest-vm-test-that-mremap-fails-on-non-existent-vma.patch added to -mm tree
@ 2022-04-28 23:47 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-04-28 23:47 UTC (permalink / raw)
  To: mm-commits, mike.kravetz, almasrymina, dossche.niels, akpm


The patch titled
     Subject: selftest/vm: test that mremap fails on non-existent vma
has been added to the -mm tree.  Its filename is
     selftest-vm-test-that-mremap-fails-on-non-existent-vma.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/selftest-vm-test-that-mremap-fails-on-non-existent-vma.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/selftest-vm-test-that-mremap-fails-on-non-existent-vma.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Niels Dossche <dossche.niels@gmail.com>
Subject: selftest/vm: test that mremap fails on non-existent vma

Add a regression test that validates that mremap fails for vma's that
don't exist.

Link: https://lkml.kernel.org/r/20220427224439.23828-3-dossche.niels@gmail.com
Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
Cc: Mina Almasry <almasrymina@google.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/vm/hugepage-mremap.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/tools/testing/selftests/vm/hugepage-mremap.c~selftest-vm-test-that-mremap-fails-on-non-existent-vma
+++ a/tools/testing/selftests/vm/hugepage-mremap.c
@@ -178,6 +178,12 @@ int main(int argc, char *argv[])
 
 	munmap(addr, length);
 
+	addr = mremap(addr, length, length, 0);
+	if (addr != MAP_FAILED) {
+		printf("mremap: Expected failure, but call succeeded\n");
+		exit(1);
+	}
+
 	close(fd);
 	unlink(argv[argc-1]);
 
_

Patches currently in -mm which might be from dossche.niels@gmail.com are

mm-mremap-fix-sign-for-efault-error-return-value.patch
selftest-vm-test-that-mremap-fails-on-non-existent-vma.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-28 23:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-28 23:47 + selftest-vm-test-that-mremap-fails-on-non-existent-vma.patch added to -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.