mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
mm: fix error handling for map_deny_write_exec
Commit4a18419f71
("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/20230308190423.46491-3-joey.gouly@arm.com Fixes:b507808ebc
("mm: implement memory-deny-write-execute as a prctl") Signed-off-by: Joey Gouly <joey.gouly@arm.com> Reported-by: Alexey Izbyshev <izbyshev@ispras.ru> Link: https://lore.kernel.org/linux-arm-kernel/8408d8901e9d7ee6b78db4c6cba04b78@ispras.ru/ Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: nd <nd@arm.com> Cc: Peter Xu <peterx@redhat.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
6bbf109067
commit
3d27a95b1d
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user