mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 02:30:30 +09: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
Notes:
sideshowbarker
2024-07-19 00:12:28 +09:00
Author: https://github.com/itamar8910
Commit: df5ea97c51
Pull-request: https://github.com/SerenityOS/serenity/pull/4741
Issue: https://github.com/SerenityOS/serenity/issues/4740
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