mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
Kernel: Always remove PageDirectories from the cr3 map on destruction
Previously we would only remove them from the map if they were attached to an AddressSpace, even though we would always add them to the map on construction. This results in an assertion failure on destruction if the page directory was never attached to an AddressSpace. (for example, on an allocation failure of said AddressSpace)
This commit is contained in:
parent
1678dcbf91
commit
6e37487477
1 changed files with 1 additions and 2 deletions
|
@ -151,8 +151,7 @@ UNMAP_AFTER_INIT void PageDirectory::allocate_kernel_directory()
|
|||
PageDirectory::~PageDirectory()
|
||||
{
|
||||
SpinlockLocker lock(s_mm_lock);
|
||||
if (m_space)
|
||||
cr3_map().remove(cr3());
|
||||
cr3_map().remove(cr3());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue