From: Andi Kleen Date: Mon, 13 Oct 2003 04:24:49 +0000 (-0700) Subject: [PATCH] Fixing mlockall & PROT_NONE X-Git-Tag: v2.6.0-test8~5^2~21 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=c3d6daa8dacd08762d93723a425d0db67bd84e60;p=history.git [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. --- diff --git a/mm/mlock.c b/mm/mlock.c index 6f026bdd68e5..0cf446b5f383 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -154,9 +154,9 @@ static int do_mlockall(int flags) newflags = vma->vm_flags | VM_LOCKED; if (!(flags & MCL_CURRENT)) newflags &= ~VM_LOCKED; - error = mlock_fixup(vma, vma->vm_start, vma->vm_end, newflags); - if (error) - break; + + /* Ignore errors */ + mlock_fixup(vma, vma->vm_start, vma->vm_end, newflags); } return error; }