Commit c3d6daa8 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Fixing mlockall & PROT_NONE

This is the minimal change to make "mlockall()" not complain about
the occasional PROT_NONE area.

PROT_NONE is commonly used on x86-64, and is no reason to not lock
in the rest of the mappings into memory.
parent a01b0767
...@@ -154,9 +154,9 @@ static int do_mlockall(int flags) ...@@ -154,9 +154,9 @@ static int do_mlockall(int flags)
newflags = vma->vm_flags | VM_LOCKED; newflags = vma->vm_flags | VM_LOCKED;
if (!(flags & MCL_CURRENT)) if (!(flags & MCL_CURRENT))
newflags &= ~VM_LOCKED; newflags &= ~VM_LOCKED;
error = mlock_fixup(vma, vma->vm_start, vma->vm_end, newflags);
if (error) /* Ignore errors */
break; mlock_fixup(vma, vma->vm_start, vma->vm_end, newflags);
} }
return error; return error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment