kernel/vm: _user_set_memory_protection() should only check the user protection
as it extends the provided protection with the kernel protection. fix hrev55016 Change-Id: I9fa9349c15b4ef896a9dadd1b1b7a4165cc03b39 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5531 Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
ee96bcfe51
commit
fc473ac261
@@ -6647,7 +6647,7 @@ _user_set_memory_protection(void* _address, size_t size, uint32 protection)
|
||||
if ((area->protection & B_KERNEL_AREA) != 0)
|
||||
return B_NOT_ALLOWED;
|
||||
if (area->protection_max != 0
|
||||
&& (protection & area->protection_max) != protection) {
|
||||
&& (protection & area->protection_max) != (protection & B_USER_PROTECTION)) {
|
||||
return B_NOT_ALLOWED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user