mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:28:11 +00:00
Kernel: Release scheduler_lock in ptrace once we know tracee is stopped
This fixes a kernel crash that occured when calling ptrace with PT_PEEK on non paged-in memory. The crash occurred because we were holding the scheduler lock while trying to read from the disk's block device, which we do not allow. Fixes #4740
This commit is contained in:
parent
a50583ade1
commit
df5ea97c51
1 changed files with 2 additions and 0 deletions
|
@ -86,6 +86,8 @@ KResultOr<u32> handle_syscall(const Kernel::Syscall::SC_ptrace_params& params, P
|
|||
if (peer->state() == Thread::State::Running)
|
||||
return KResult(-EBUSY);
|
||||
|
||||
scheduler_lock.unlock();
|
||||
|
||||
switch (params.request) {
|
||||
case PT_CONTINUE:
|
||||
peer->send_signal(SIGCONT, &caller);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue