The VM did not support the flags passed to set_area_protection(), but it didn't
know it yet - this fixes an endless loop in the VM fault handler. set_area_protection() no longer disallows settings B_EXECUTE_AREA and B_WRITE_AREA at the same time. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12252 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d038008dae
commit
fbf12e8758
@ -1071,10 +1071,7 @@ write_user_memory(void *_address, const void *_buffer, int32 size,
|
||||
bool protectionChanged = false;
|
||||
if (!(areaInfo.protection & (B_WRITE_AREA | B_KERNEL_WRITE_AREA))) {
|
||||
error = set_area_protection(area,
|
||||
// areaInfo.protection | B_KERNEL_WRITE_AREA);
|
||||
(areaInfo.protection & ~B_EXECUTE_AREA) | B_KERNEL_WRITE_AREA);
|
||||
// TODO: Not being writable when being executable is currently a requirement
|
||||
// of vm_set_area_protection().
|
||||
areaInfo.protection | B_WRITE_AREA);
|
||||
if (error != B_OK) {
|
||||
TRACE(("write_user_memory(): failed to set new protection for "
|
||||
"area %ld: %lx\n", area, error));
|
||||
|
Loading…
Reference in New Issue
Block a user