signal: fix lock release order

This commit is contained in:
Matheus
2025-09-07 00:06:52 -03:00
parent 1f4660d407
commit 1de40e5c4a
+1 -1
View File
@@ -350,9 +350,9 @@ void signal_signalproc(struct proc_t *proc, int signal) {
// XXX possible race condition where a thread will change the process mask or the action of stopping signals
// after it was sent to everyone
if ((shouldstop || signal == SIGCONT) == false) {
spinlock_release(&proc->threadlistlock);
THREAD_LEAVE(thread);
PROCESS_LEAVE(proc);
spinlock_release(&proc->threadlistlock);
return;
}
}