-/* $OpenBSD: uvm_map.c,v 1.311 2023/02/13 14:51:49 deraadt Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.312 2023/02/13 14:52:55 deraadt Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
if (PMAP_CHECK_COPYIN == 0 ||
map->check_copyin_count >= UVM_MAP_CHECK_COPYIN_MAX)
return;
+ vm_map_assert_wrlock(map);
map->check_copyin[map->check_copyin_count].start = start;
map->check_copyin[map->check_copyin_count].end = end;
membar_producer();
end = MIN(end, map->max_offset);
if (start >= end)
return 0;
+ vm_map_lock(map);
check_copyin_add(map, start, end);
+ vm_map_unlock(map);
return (0);
}
#endif /* PMAP_CHECK_COPYIN */