kernel: bad ordering of list insert / wakeup caused crashes
This commit is contained in:
parent
ade7d13707
commit
5b16cd6ce4
@ -222,6 +222,7 @@ int send_signal(pid_t process, int signal, int force_root) {
|
||||
sig->handler = (uintptr_t)receiver->signals[signal];
|
||||
sig->signum = signal;
|
||||
memset(&sig->registers_before, 0x00, sizeof(struct regs));
|
||||
list_insert(receiver->signal_queue, sig);
|
||||
|
||||
process_awaken_signal(receiver);
|
||||
|
||||
@ -229,8 +230,6 @@ int send_signal(pid_t process, int signal, int force_root) {
|
||||
make_process_ready(receiver);
|
||||
}
|
||||
|
||||
list_insert(receiver->signal_queue, sig);
|
||||
|
||||
if (receiver == this_core->current_process) {
|
||||
/* Forces us to be rescheduled and enter signal handler */
|
||||
if (receiver->signal_kstack) {
|
||||
|
Loading…
Reference in New Issue
Block a user