aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Xu <[email protected]>2023-03-08 19:04:22 +0000
committerAndrew Morton <[email protected]>2023-03-23 17:18:33 -0700
commitd035230ec9937a9138921d2a0eeb99496ea7eac0 (patch)
tree5a519f5c8158373c660aa87f3be1e35eac747d91
parent3d27a95b1d96757e48ce970baa3d419af299c2af (diff)
kselftest: vm: fix unused variable warning
Remove unused variable from the MDWE test. [[email protected]: add commit message] Link: https://lkml.kernel.org/r/[email protected] Fixes: 4cf1fe34fd18 ("kselftest: vm: add tests for memory-deny-write-execute") Signed-off-by: Peter Xu <[email protected]> Signed-off-by: Joey Gouly <[email protected]> Acked-by: Catalin Marinas <[email protected]> Cc: Alexey Izbyshev <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Kees Cook <[email protected]> Cc: nd <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--tools/testing/selftests/mm/mdwe_test.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/mm/mdwe_test.c b/tools/testing/selftests/mm/mdwe_test.c
index f466a099f1bf..bc91bef5d254 100644
--- a/tools/testing/selftests/mm/mdwe_test.c
+++ b/tools/testing/selftests/mm/mdwe_test.c
@@ -163,9 +163,8 @@ TEST_F(mdwe, mprotect_WRITE_EXEC)
TEST_F(mdwe, mmap_FIXED)
{
- void *p, *p2;
+ void *p;
- p2 = mmap(NULL, self->size, PROT_READ | PROT_EXEC, self->flags, 0, 0);
self->p = mmap(NULL, self->size, PROT_READ, self->flags, 0, 0);
ASSERT_NE(self->p, MAP_FAILED);