Added support for protection flag B_USER_CLONEABLE_AREA.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11045 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1127,8 +1127,10 @@ vm_clone_area(aspace_id aid, const char *name, void **address, uint32 addressSpe
|
|||||||
return ERR_VM_INVALID_REGION;
|
return ERR_VM_INVALID_REGION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sourceArea->aspace == kernel_aspace && aspace != kernel_aspace) {
|
if (sourceArea->aspace == kernel_aspace && aspace != kernel_aspace
|
||||||
// kernel areas must not be cloned in userland
|
&& !(sourceArea->protection & B_USER_CLONEABLE_AREA)) {
|
||||||
|
// kernel areas must not be cloned in userland, unless explicitly
|
||||||
|
// declared user-cloneable upon construction
|
||||||
status = B_NOT_ALLOWED;
|
status = B_NOT_ALLOWED;
|
||||||
} else {
|
} else {
|
||||||
vm_cache_acquire_ref(sourceArea->cache_ref, true);
|
vm_cache_acquire_ref(sourceArea->cache_ref, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user