diff --git a/syscall/msg.c b/syscall/msg.c index 3acfa94..4c59bfb 100644 --- a/syscall/msg.c +++ b/syscall/msg.c @@ -240,12 +240,12 @@ kern_status_t sys_msg_send( port_handle, &port_obj, &port_handle_flags); + task_unlock_irqrestore(self, flags); + if (status != KERN_OK) { return status; } - task_unlock_irqrestore(self, flags); - struct port *port = port_cast(port_obj); if (!port) { object_unref(port_obj);