From ac3ea277aad289bb9c9a050646041cb14e301f4d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 24 Aug 2022 12:30:59 +0200 Subject: [PATCH] Kernel: Don't take MM lock in ~PageDirectory() We don't need the MM lock to unregister a PageDirectory from the CR3 map. This is already protected by the CR3 map's own lock. --- Kernel/Memory/PageDirectory.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Kernel/Memory/PageDirectory.cpp b/Kernel/Memory/PageDirectory.cpp index f74cd7c4f6..2c858a7959 100644 --- a/Kernel/Memory/PageDirectory.cpp +++ b/Kernel/Memory/PageDirectory.cpp @@ -115,7 +115,6 @@ UNMAP_AFTER_INIT void PageDirectory::allocate_kernel_directory() PageDirectory::~PageDirectory() { if (is_cr3_initialized()) { - SpinlockLocker lock(s_mm_lock); deregister_page_directory(this); } }