ladybird/Kernel/Memory
Brian Gianforcaro 2d06f6399f Kernel: Fix SMP deadlock in MM::allocate_contiguous_physical_pages
This deadlock was introduced with the creation of this API. The lock
order is such that we always need to take the page directory lock
before we ever take the MM lock.

This function violated that, as both Region creation and region
destruction require the pd and mm locks, but with the mm lock
already acquired we deadlocked with SMP mode enabled while other
threads were allocating regions.

With this change SMP boots to the desktop successfully for me,
(and then subsequently has other issues). :^)
2022-08-09 12:09:59 +02:00
..
AddressSpace.cpp Kernel: Add some inline capacity to find_regions_intersecting 2022-07-15 12:42:43 +02:00
AddressSpace.h Kernel: Add some inline capacity to find_regions_intersecting 2022-07-15 12:42:43 +02:00
AllocationStrategy.h Kernel: Rename Kernel/VM/ to Kernel/Memory/ 2021-08-06 14:05:58 +02:00
AnonymousVMObject.cpp Kernel+Userland: Rename prefix of user_physical => physical 2022-07-14 23:27:46 +02:00
AnonymousVMObject.h Kernel: Stop leaking leftover committed cow pages from forked processes 2022-07-10 22:17:21 +03:00
InodeVMObject.cpp Kernel: Use default constructors/destructors 2022-03-17 00:51:36 -07:00
InodeVMObject.h Kernel: Make SharedInodeVMObject pages Bitmap allocation OOM-fallible 2022-02-11 17:49:46 +02:00
MappedROM.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
MemoryManager.cpp Kernel: Fix SMP deadlock in MM::allocate_contiguous_physical_pages 2022-08-09 12:09:59 +02:00
MemoryManager.h Kernel+Userland: Rename prefix of user_physical => physical 2022-07-14 23:27:46 +02:00
PageDirectory.cpp Kernel+Userland: Rename prefix of user_physical => physical 2022-07-14 23:27:46 +02:00
PageDirectory.h Kernel: Add missing include to PageDirectory.h 2022-04-03 21:51:58 +02:00
PageFaultResponse.h Kernel: Rename Kernel/VM/ to Kernel/Memory/ 2021-08-06 14:05:58 +02:00
PhysicalPage.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
PhysicalPage.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
PhysicalRegion.cpp Kernel: Use default constructors/destructors 2022-03-17 00:51:36 -07:00
PhysicalRegion.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
PhysicalZone.cpp Kernel: Add implied auto qualifiers in Memory 2022-01-09 23:29:57 -08:00
PhysicalZone.h Kernel: Remove the kmalloc_eternal heap :^) 2021-12-28 21:02:38 +01:00
PrivateInodeVMObject.cpp Kernel: Use default constructors/destructors 2022-03-17 00:51:36 -07:00
PrivateInodeVMObject.h Kernel: Make SharedInodeVMObject pages Bitmap allocation OOM-fallible 2022-02-11 17:49:46 +02:00
Region.cpp Kernel+Userland: Rename prefix of user_physical => physical 2022-07-14 23:27:46 +02:00
Region.h Kernel: Remove unused ShouldDeallocateVirtualRange parameters 2022-04-05 01:15:22 +02:00
RegionTree.cpp Kernel: Limit free space between randomized memory allocations 2022-04-21 13:16:56 +02:00
RegionTree.h Kernel: Move allocate_unbacked_region_anywhere() to MemoryManager 2022-04-05 13:45:10 +02:00
RingBuffer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
RingBuffer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ScatterGatherList.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
ScatterGatherList.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ScopedAddressSpaceSwitcher.cpp Kernel: Implement InterruptDisabler using generic Processor functions 2022-06-02 13:14:12 +01:00
ScopedAddressSpaceSwitcher.h Kernel: Rename ProcessPagingScope => ScopedAddressSpaceSwitcher 2021-09-06 18:56:51 +02:00
SharedFramebufferVMObject.cpp Kernel+Userland: Rename prefix of user_physical => physical 2022-07-14 23:27:46 +02:00
SharedFramebufferVMObject.h Kernel/Memory: Introduce the SharedFramebufferVMObject class 2022-06-06 20:11:05 +01:00
SharedInodeVMObject.cpp Kernel: Make Inode::set_shared_vmobject() OOM-fallible 2022-02-14 11:35:20 +01:00
SharedInodeVMObject.h Kernel: Make SharedInodeVMObject pages Bitmap allocation OOM-fallible 2022-02-11 17:49:46 +02:00
TypedMapping.h Kernel/Memory: Add TypedMapping base_address method 2022-05-05 20:55:57 +02:00
VirtualRange.cpp Kernel: Use AddressSpace region tree for range allocation 2022-04-03 21:51:58 +02:00
VirtualRange.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
VMObject.cpp Kernel: Remove infallible VMObject resource factory functions 2022-01-15 22:16:00 +02:00
VMObject.h Kernel/Memory: Introduce the SharedFramebufferVMObject class 2022-06-06 20:11:05 +01:00