ladybird/Kernel/Memory
Andreas Kling 08b4d8f0de Kernel: Fix deadlock in ~Memory::Region()
First off: unregister the region from MemoryManager before unmapping it.
The order of operations here was a bit strange, presumably to avoid a
situation where a fault would happen while unmapping, and the fault
handler would find the MemoryManager region list in an invalid state.

Unregistering it before unmapping sidesteps the whole problem, and
allows us to easily fix another problem: a deadlock could occur due
to inconsistent acquisition order (PageDirectory must come before MM.)
2021-08-09 11:46:31 +02:00
..
AddressSpace.cpp Kernel: Remove unused Process pointer in Memory::AddressSpace 2021-08-08 00:03:45 +02:00
AddressSpace.h Kernel: Remove unused Process pointer in Memory::AddressSpace 2021-08-08 00:03:45 +02:00
AllocationStrategy.h Kernel: Rename Kernel/VM/ to Kernel/Memory/ 2021-08-06 14:05:58 +02:00
AnonymousVMObject.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
AnonymousVMObject.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
InodeVMObject.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
InodeVMObject.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
MappedROM.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
MemoryManager.cpp Kernel: Don't hog MM lock in find_region_from_vaddr() 2021-08-09 11:46:31 +02:00
MemoryManager.h Kernel: Remove unused list of user regions in MemoryManager 2021-08-09 11:46:31 +02:00
PageDirectory.cpp Everywhere: Replace AK::Singleton => Singleton 2021-08-08 00:03:45 +02:00
PageDirectory.h Kernel: Make identity mapping mechanism used during AP boot non-generic 2021-08-06 21:35:56 +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: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
PhysicalRegion.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
PhysicalZone.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
PhysicalZone.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
PrivateInodeVMObject.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
PrivateInodeVMObject.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
ProcessPagingScope.cpp Kernel: Rename Kernel/VM/ to Kernel/Memory/ 2021-08-06 14:05:58 +02:00
ProcessPagingScope.h Kernel: Rename Kernel/VM/ to Kernel/Memory/ 2021-08-06 14:05:58 +02:00
Region.cpp Kernel: Fix deadlock in ~Memory::Region() 2021-08-09 11:46:31 +02:00
Region.h Kernel: Add convenience values to the Memory::Region::Access enum 2021-08-06 22:25:00 +02:00
RingBuffer.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
RingBuffer.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
ScatterGatherList.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
ScatterGatherList.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
SharedInodeVMObject.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
SharedInodeVMObject.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
TypedMapping.h Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
VirtualRange.cpp Kernel: Rename Range => VirtualRange 2021-08-06 14:05:58 +02:00
VirtualRange.h Kernel: Rename Range => VirtualRange 2021-08-06 14:05:58 +02:00
VirtualRangeAllocator.cpp Kernel: Rename Range => VirtualRange 2021-08-06 14:05:58 +02:00
VirtualRangeAllocator.h Kernel: Move SpinLock.h into Locking/ 2021-08-07 11:48:00 +02:00
VMObject.cpp Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace 2021-08-06 14:05:58 +02:00
VMObject.h Kernel: Move Mutex into Locking/ 2021-08-07 11:48:00 +02:00