Commit d035230e authored by Peter Xu's avatar Peter Xu Committed by Andrew Morton

kselftest: vm: fix unused variable warning

Remove unused variable from the MDWE test.

[joey.gouly@arm.com: add commit message]
Link: https://lkml.kernel.org/r/20230308190423.46491-4-joey.gouly@arm.com
Fixes: 4cf1fe34 ("kselftest: vm: add tests for memory-deny-write-execute")
Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
Signed-off-by: default avatarJoey Gouly <joey.gouly@arm.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Cc: Alexey Izbyshev <izbyshev@ispras.ru>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: nd <nd@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 3d27a95b
...@@ -163,9 +163,8 @@ TEST_F(mdwe, mprotect_WRITE_EXEC) ...@@ -163,9 +163,8 @@ TEST_F(mdwe, mprotect_WRITE_EXEC)
TEST_F(mdwe, mmap_FIXED) 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); self->p = mmap(NULL, self->size, PROT_READ, self->flags, 0, 0);
ASSERT_NE(self->p, MAP_FAILED); ASSERT_NE(self->p, MAP_FAILED);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment