From 325699d64a9ac0776609e955ef95ea972f68643e Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 29 Mar 2026 11:51:26 +0100 Subject: [PATCH] kernel: fix sys_msg_send returning without unlocking `self` --- syscall/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);