From 9583c41d8aec16ffb58f4634e30dca35d4eadb80 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 6 Apr 2008 02:35:07 +0000 Subject: [PATCH] Added TODO regarding potential deadlock. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24820 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 5c1b324808..d1f941a656 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -3700,6 +3700,10 @@ vm_page_fault(addr_t address, addr_t faultAddress, bool isWrite, bool isUser, vm_area *area; acquire_sem_etc(addressSpace->sem, READ_COUNT, 0, 0); +// TODO: The user_memcpy() below can cause a deadlock, if it causes a page +// fault and someone is already waiting for a write lock on the same address +// space. This thread will then try to acquire the semaphore again and will +// be queued after the writer. area = vm_area_lookup(addressSpace, faultAddress); dprintf("vm_page_fault: sending team \"%s\" 0x%lx SIGSEGV, ip %#lx (\"%s\" +%#lx)\n",