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

Kernel: VERIFY that signals are not sent to Kernel processes

Kernel processes can't handle signals, nor should they ever receive any
This commit is contained in:
Idan Horowitz 2022-02-21 19:53:39 +02:00 committed by Andreas Kling
parent 2c996cbbee
commit 0911112286
2 changed files with 2 additions and 0 deletions

View file

@ -721,6 +721,7 @@ u32 Thread::pending_signals_for_state() const
void Thread::send_signal(u8 signal, [[maybe_unused]] Process* sender)
{
VERIFY(signal < 32);
VERIFY(process().is_user_process());
SpinlockLocker scheduler_lock(g_scheduler_lock);
// FIXME: Figure out what to do for masked signals. Should we also ignore them here?