diff options
author | Joey Gouly <[email protected]> | 2023-03-08 19:04:21 +0000 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-03-23 17:18:33 -0700 |
commit | 3d27a95b1d96757e48ce970baa3d419af299c2af (patch) | |
tree | 26e373d94bc85311d26a23916f4cfb9147cc59c7 | |
parent | 6bbf1090672673183a98cd6e19de91fa5a319df0 (diff) |
mm: fix error handling for map_deny_write_exec
Commit 4a18419f71cd ("mm/mprotect: use mmu_gather") changed 'goto out;' to
'break' in the loop.
This wasn't noticed while rebasing the MDWE patches, so fix it now.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: b507808ebce2 ("mm: implement memory-deny-write-execute as a prctl")
Signed-off-by: Joey Gouly <[email protected]>
Reported-by: Alexey Izbyshev <[email protected]>
Link: https://lore.kernel.org/linux-arm-kernel/[email protected]/
Reviewed-by: Catalin Marinas <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: nd <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | mm/mprotect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c index 231929f119d9..13e84d8c0797 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -805,7 +805,7 @@ static int do_mprotect_pkey(unsigned long start, size_t len, if (map_deny_write_exec(vma, newflags)) { error = -EACCES; - goto out; + break; } /* Allow architectures to sanity-check the new flags */ |