mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +00:00
Kernel: Don't require MM lock for Region::set_page_directory()
The MM lock is not required for this, it's just a simple ref-counted pointer assignment.
This commit is contained in:
parent
abb84b9fcd
commit
75348bdfd3
2 changed files with 0 additions and 2 deletions
|
@ -214,7 +214,6 @@ ErrorOr<Region*> AddressSpace::allocate_region_with_vmobject(RandomizeVirtualAdd
|
||||||
if (prot == PROT_NONE) {
|
if (prot == PROT_NONE) {
|
||||||
// For PROT_NONE mappings, we don't have to set up any page table mappings.
|
// For PROT_NONE mappings, we don't have to set up any page table mappings.
|
||||||
// We do still need to attach the region to the page_directory though.
|
// We do still need to attach the region to the page_directory though.
|
||||||
SpinlockLocker mm_locker(s_mm_lock);
|
|
||||||
region->set_page_directory(page_directory());
|
region->set_page_directory(page_directory());
|
||||||
} else {
|
} else {
|
||||||
auto result = region->map(page_directory(), ShouldFlushTLB::No);
|
auto result = region->map(page_directory(), ShouldFlushTLB::No);
|
||||||
|
|
|
@ -280,7 +280,6 @@ void Region::unmap_with_locks_held(ShouldFlushTLB should_flush_tlb, SpinlockLock
|
||||||
void Region::set_page_directory(PageDirectory& page_directory)
|
void Region::set_page_directory(PageDirectory& page_directory)
|
||||||
{
|
{
|
||||||
VERIFY(!m_page_directory || m_page_directory == &page_directory);
|
VERIFY(!m_page_directory || m_page_directory == &page_directory);
|
||||||
VERIFY(s_mm_lock.is_locked_by_current_processor());
|
|
||||||
m_page_directory = page_directory;
|
m_page_directory = page_directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue