uspc_ret: ensure task is dropped before exiting

Fix current task double-borrow bug when exiting with a signal.
This commit is contained in:
Matthew Leach
2026-01-09 11:48:08 +00:00
committed by Ashwin Naren
parent 6d8854fe30
commit c304ec07fe

View File

@@ -239,6 +239,7 @@ pub fn dispatch_userspace_task(ctx: *mut UserCtx) {
None => continue,
Some(KSignalAction::Term | KSignalAction::Core) => {
// Terminate the process, and find a new task.
drop(task);
kernel_exit_with_signal(signal, false);
state = State::PickNewTask;