mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
Kernel: Protect Process::m_name with a spinlock
This also lets us remove the `get_process_name` and `set_process_name` syscalls from the big lock. :^)
This commit is contained in:
parent
b26ecca970
commit
fe7b08dad7
13 changed files with 102 additions and 42 deletions
|
@ -22,7 +22,9 @@ ErrorOr<void> Process::do_kill(Process& process, int signal)
|
|||
if (!can_send_signal)
|
||||
return EPERM;
|
||||
if (process.is_kernel_process()) {
|
||||
dbgln("Attempted to send signal {} to kernel process {} ({})", signal, process.name(), process.pid());
|
||||
process.name().with([&](auto& process_name) {
|
||||
dbgln("Attempted to send signal {} to kernel process {} ({})", signal, process_name->view(), process.pid());
|
||||
});
|
||||
return EPERM;
|
||||
}
|
||||
if (signal != 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue