mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-22 01:16:26 +04:00
fix(os): fix kstack leak issues
The kstack_id is not recycled when KernelStack is dropped, which leads to kstack leak issue. Ch8 branch, and branches after that, are also affected by this issue. Signed-off-by: Xuewei Niu <justxuewei@apache.org>
This commit is contained in:
parent
d0daf8f4a4
commit
d7ccea8f18
@ -87,6 +87,7 @@ impl Drop for KernelStack {
|
||||
KERNEL_SPACE
|
||||
.exclusive_access()
|
||||
.remove_area_with_start_vpn(kernel_stack_bottom_va.into());
|
||||
KSTACK_ALLOCATOR.exclusive_access().dealloc(self.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user