mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-01 22:51:55 +00:00
Kernel: Fix assertion when releasing contiguous memory region
There is no guarantee that the memory manager lock is held when physical pages are released, so just acquire the memory manager lock.
This commit is contained in:
parent
4dfe797263
commit
cf8ce839da
Notes:
sideshowbarker
2024-07-19 03:22:54 +09:00
Author: https://github.com/tomuta
Commit: cf8ce839da
Pull-request: https://github.com/SerenityOS/serenity/pull/3235
1 changed files with 1 additions and 1 deletions
|
@ -453,7 +453,7 @@ RefPtr<PhysicalPage> MemoryManager::allocate_user_physical_page(ShouldZeroFill s
|
|||
|
||||
void MemoryManager::deallocate_supervisor_physical_page(PhysicalPage&& page)
|
||||
{
|
||||
ASSERT(s_mm_lock.is_locked());
|
||||
ScopedSpinLock lock(s_mm_lock);
|
||||
for (auto& region : m_super_physical_regions) {
|
||||
if (!region.contains(page)) {
|
||||
klog() << "MM: deallocate_supervisor_physical_page: " << page.paddr() << " not in " << region.lower() << " -> " << region.upper();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue