mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
Kernel: Don't hog MM lock in find_region_from_vaddr()
We don't want to be holding the MM lock if it's a user region and we have to consult the page directory, since that can lead to a deadlock if we don't already have the page directory lock.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 07:11:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/95c8e421ae5
@@ -673,7 +673,6 @@ void MemoryManager::validate_syscall_preconditions(AddressSpace& space, Register
|
||||
|
||||
Region* MemoryManager::find_region_from_vaddr(VirtualAddress vaddr)
|
||||
{
|
||||
ScopedSpinLock lock(s_mm_lock);
|
||||
if (auto* region = kernel_region_from_vaddr(vaddr))
|
||||
return region;
|
||||
auto page_directory = PageDirectory::find_by_cr3(read_cr3());
|
||||
|
||||
Reference in New Issue
Block a user