From 04f148c74a98c4dd795ce76ae67a21829c1fdee9 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 23 Dec 2023 22:28:57 -0500 Subject: [PATCH] kernel/vm: Allow B_CLONEABLE_AREA flag to be added through set_area_protection. --- src/system/kernel/vm/vm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 1a201ff5c4..49e752b678 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -6551,7 +6551,7 @@ _user_get_next_area_info(team_id team, ssize_t* userCookie, area_info* userInfo) status_t _user_set_area_protection(area_id area, uint32 newProtection) { - if ((newProtection & ~B_USER_PROTECTION) != 0) + if ((newProtection & ~(B_USER_PROTECTION | B_CLONEABLE_AREA)) != 0) return B_BAD_VALUE; return vm_set_area_protection(VMAddressSpace::CurrentID(), area,