1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

Kernel: Mark sys$dup2() as not needing the big lock

This syscall doesn't access any data that was implicitly protected by
the big lock.
This commit is contained in:
Andreas Kling 2022-03-08 16:31:45 +01:00
parent 8aad9e7448
commit d074aae422
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ namespace Kernel {
ErrorOr<FlatPtr> Process::sys$dup2(int old_fd, int new_fd)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::stdio));
return m_fds.with_exclusive([&](auto& fds) -> ErrorOr<FlatPtr> {
auto description = TRY(fds.open_file_description(old_fd));