mprotect: Fix early exit condition on page table attribute
This commit is contained in:
committed by
Balazs Gerofi
parent
328609269b
commit
5f4dbb2c71
@@ -1445,7 +1445,7 @@ int change_prot_process_memory_range(struct process_vm *vm,
|
|||||||
*/
|
*/
|
||||||
if (range->memobj && (range->flag & VR_PRIVATE)) {
|
if (range->memobj && (range->flag & VR_PRIVATE)) {
|
||||||
setattr &= ~PTATTR_WRITABLE;
|
setattr &= ~PTATTR_WRITABLE;
|
||||||
if (clrattr == setattr == 0) {
|
if (!clrattr && !setattr) {
|
||||||
range->flag = newflag;
|
range->flag = newflag;
|
||||||
error = 0;
|
error = 0;
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
Reference in New Issue
Block a user