diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-24 12:27:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-24 14:57:51 +0200 |
commit | 05156cac945df875d7e6cd796f761b849f52721a (patch) | |
tree | e8d27d112d3bae5b439470842c447163ae8c19e8 | |
parent | 2607a6a4bde9893e7fbf56254f14de437ccbf752 (diff) | |
download | serenity-05156cac945df875d7e6cd796f761b849f52721a.zip |
Kernel: Don't take MM lock in MemoryManager::enter_address_space()
We're not accessing any of the MM members here. Also remove some
redundant code to update CR3, since it calls activate_page_directory()
which does exactly the same thing.
-rw-r--r-- | Kernel/Memory/MemoryManager.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp index 4d1b3df8ef..be715525bf 100644 --- a/Kernel/Memory/MemoryManager.cpp +++ b/Kernel/Memory/MemoryManager.cpp @@ -1018,9 +1018,6 @@ void MemoryManager::enter_address_space(AddressSpace& space) { auto* current_thread = Thread::current(); VERIFY(current_thread != nullptr); - SpinlockLocker lock(s_mm_lock); - - current_thread->regs().cr3 = space.page_directory().cr3(); activate_page_directory(space.page_directory(), current_thread); } |