Solve context leak when switching

This commit is contained in:
Wildan M
2026-06-19 17:33:46 +07:00
parent 101f090ef9
commit 622a4fb3cd
2 changed files with 4 additions and 8 deletions
+3
View File
@@ -351,6 +351,9 @@ pub fn switch(token: &mut CleanLockToken) -> SwitchResult {
.being_sigkilled
.set(next_context.being_sigkilled);
// Anything implement Drop must be manually dropped now
drop(prev_context_lock);
unsafe {
percpu.new_addrsp_guard.set(addr_space_guard);
arch::switch_to(prev_context, next_context);