diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-12-29 00:16:27 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-29 18:08:15 +0100 |
commit | 0f7fe1eb08851e481ee760528362b71d5124eaf5 (patch) | |
tree | 0bf4fc86e2f218a56313f314d066c35c92ec2e9e /Kernel/Syscalls/purge.cpp | |
parent | bad6d50b86ae1e0a46219baf149fa0a3574af9ce (diff) | |
download | serenity-0f7fe1eb08851e481ee760528362b71d5124eaf5.zip |
Kernel: Use Process::require_no_promises instead of REQUIRE_NO_PROMISES
This change lays the foundation for making the require_promise return
an error hand handling the process abort outside of the syscall
implementations, to avoid cases where we would leak resources.
It also has the advantage that it makes removes a gs pointer read
to look up the current thread, then process for every syscall. We
can instead go through the Process this pointer in most cases.
Diffstat (limited to 'Kernel/Syscalls/purge.cpp')
-rw-r--r-- | Kernel/Syscalls/purge.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/purge.cpp b/Kernel/Syscalls/purge.cpp index 0c52501fc2..722c67166f 100644 --- a/Kernel/Syscalls/purge.cpp +++ b/Kernel/Syscalls/purge.cpp @@ -15,7 +15,7 @@ namespace Kernel { ErrorOr<FlatPtr> Process::sys$purge(int mode) { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) - REQUIRE_NO_PROMISES; + require_no_promises(); if (!is_superuser()) return EPERM; size_t purged_page_count = 0; |