mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 13:45:07 +00: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:
parent
96c7b70de3
commit
95c8e421ae
1 changed files with 0 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue