diff options
author | Andrew Kaster <akaster@serenityos.org> | 2021-08-22 21:48:58 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-28 20:53:38 +0200 |
commit | 8e70b8521563778489e26de084f5994d95c3086a (patch) | |
tree | 4b1e7aa8d96c0582db34bbb62f77ac2be8e12c47 /Kernel/Syscalls/mmap.cpp | |
parent | 2038d2c49eabc9cabb6048ee14b22d6565338c37 (diff) | |
download | serenity-8e70b8521563778489e26de084f5994d95c3086a.zip |
Kernel: Don't disable interrupts in validate_inode_mmap_prot
There's no need to disable interrupts when trying to access an inode's
shared vmobject. Additionally, Inode::shared_vmobject() acquires a Mutex
which is a recipe for deadlock if acquired with interrupts disabled.
Diffstat (limited to 'Kernel/Syscalls/mmap.cpp')
-rw-r--r-- | Kernel/Syscalls/mmap.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp index 6fcd86d2ae..d3653cf228 100644 --- a/Kernel/Syscalls/mmap.cpp +++ b/Kernel/Syscalls/mmap.cpp @@ -5,7 +5,6 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include <Kernel/Arch/x86/InterruptDisabler.h> #include <Kernel/Arch/x86/MSR.h> #include <Kernel/Arch/x86/SmapDisabler.h> #include <Kernel/FileSystem/FileDescription.h> @@ -115,7 +114,6 @@ static bool validate_inode_mmap_prot(const Process& process, int prot, const Ino // keep a Custody or something from mmap time. if ((prot & PROT_WRITE) && !metadata.may_write(process)) return false; - InterruptDisabler disabler; if (auto shared_vmobject = inode.shared_vmobject()) { if ((prot & PROT_EXEC) && shared_vmobject->writable_mappings()) return false; |