diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2021-05-13 12:33:23 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2021-05-13 12:33:23 +0000 |
| commit | 9246b3090cbc82c54350391601b9acef2aa9a625 (patch) | |
| tree | f40350462945ea1ea491e183e08d30e2a243fd58 /sys/vm/vm_map.c | |
| parent | b23362afa9956a22225dc4edd5dd4d5883e39de8 (diff) | |
Diffstat (limited to 'sys/vm/vm_map.c')
| -rw-r--r-- | sys/vm/vm_map.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index d870fe3507fd..1ac4ccf72f11 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4867,6 +4867,10 @@ vmspace_unshare(struct proc *p) struct vmspace *newvmspace; vm_ooffset_t fork_charge; + /* + * The caller is responsible for ensuring that the reference count + * cannot concurrently transition 1 -> 2. + */ if (refcount_load(&oldvmspace->vm_refcnt) == 1) return (0); fork_charge = 0; |
