mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
Kernel: Move validate_syscall_preconditions outside of the big lock
Now that we hold the space lock for the duration of the validation it should be safe to move the validation outside the big lock.
This commit is contained in:
parent
85e95105c6
commit
354e18a5a0
1 changed files with 3 additions and 3 deletions
|
@ -196,9 +196,6 @@ NEVER_INLINE void syscall_handler(TrapFrame* trap)
|
|||
PANIC("Syscall from process with IOPL != 0");
|
||||
}
|
||||
|
||||
// NOTE: We take the big process lock before inspecting memory regions.
|
||||
process.big_lock().lock();
|
||||
|
||||
MM.validate_syscall_preconditions(process.space(), regs);
|
||||
|
||||
FlatPtr function;
|
||||
|
@ -207,6 +204,9 @@ NEVER_INLINE void syscall_handler(TrapFrame* trap)
|
|||
FlatPtr arg3;
|
||||
regs.capture_syscall_params(function, arg1, arg2, arg3);
|
||||
|
||||
process.big_lock().lock();
|
||||
|
||||
|
||||
auto result = Syscall::handle(regs, function, arg1, arg2, arg3);
|
||||
if (result.is_error()) {
|
||||
regs.set_return_reg(result.error());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue