From 13b2f36d85756df7088be24acdcf847944b6b9ef Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Thu, 22 Feb 2024 08:24:32 +0000 Subject: vm_map_lookup: Add parameter for keeping map locked This adds a parameter called keep_map_locked to vm_map_lookup() that allows the function to return with the map locked. This is to prepare for fixing a bug with gsync where the map is locked twice by mistake. Co-Authored-By: Sergey Bugaev Message-ID: <20240222082410.422869-3-damien@zamaudio.com> --- vm/vm_fault.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm/vm_fault.c') diff --git a/vm/vm_fault.c b/vm/vm_fault.c index c6e28004..d99425a3 100644 --- a/vm/vm_fault.c +++ b/vm/vm_fault.c @@ -1213,7 +1213,7 @@ kern_return_t vm_fault( * it to begin the search. */ - if ((kr = vm_map_lookup(&map, vaddr, fault_type, &version, + if ((kr = vm_map_lookup(&map, vaddr, fault_type, FALSE, &version, &object, &offset, &prot, &wired)) != KERN_SUCCESS) { goto done; @@ -1375,7 +1375,7 @@ kern_return_t vm_fault( * take another fault. */ kr = vm_map_lookup(&map, vaddr, - fault_type & ~VM_PROT_WRITE, &version, + fault_type & ~VM_PROT_WRITE, FALSE, &version, &retry_object, &retry_offset, &retry_prot, &wired); -- cgit v1.2.3