Skip to contentSkip to conversation

selftest-vm-test-that-mremap-fails-on-non-existent-vma.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message May 10, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftest/vm: test that mremap fails on non-existent vma
has been removed from the -mm tree. Its filename was
selftest-vm-test-that-mremap-fails-on-non-existent-vma.patch

This patch was dropped because it was merged into mm-stable

------------------------------------------------------
From: Niels Dossche <[email protected]>
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.

---

 tools/testing/selftests/vm/hugepage-mremap.c |    6 ++++++
 1 file changed, 6 insertions(+)
tools/testing/selftests/vm/hugepage-mremap.c renamed from tools/testing/selftests/vm/hugepage-mremap.c~selftest-vm-test-that-mremap-fails-on-non-existent-vma +6 -0
@@ -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 [email protected] are