diff options
author | sotech117 <michael_foiani@brown.edu> | 2024-05-15 05:55:30 +0000 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2024-05-15 05:55:30 +0000 |
commit | 81905c31a0033ad447720cc1f36b8ef90be1a3ac (patch) | |
tree | f5f9d1324d0affc6fb54be570e2e2f342667c5c0 /kernel/vm/vmmap.c | |
parent | af9104c3e6b6693e0f5e39361048b572c7031794 (diff) |
add locks to fix some tests
Diffstat (limited to 'kernel/vm/vmmap.c')
-rw-r--r-- | kernel/vm/vmmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/vm/vmmap.c b/kernel/vm/vmmap.c index e301ac0..4d671d2 100644 --- a/kernel/vm/vmmap.c +++ b/kernel/vm/vmmap.c @@ -329,8 +329,10 @@ vmmap_t *vmmap_clone(vmmap_t *map) // If the vmarea is share-mapped if (vma->vma_flags & MAP_SHARED) { + mobj_lock(vma->vma_obj); new_vmarea->vma_obj = vma->vma_obj; mobj_ref(new_vmarea->vma_obj); + mobj_unlock(vma->vma_obj); } // If the vmarea is not share-mapped |