mirror of
https://review.haiku-os.org/haiku
synced 2025-01-19 21:11:28 +01:00
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 <no-reply+buildbot@haiku-os.org> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user