From c3d6daa8dacd08762d93723a425d0db67bd84e60 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sun, 12 Oct 2003 21:24:49 -0700 Subject: [PATCH] [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. --- mm/mlock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/mlock.c b/mm/mlock.c index 6f026bdd68e59..0cf446b5f3832 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; } -- 2.53.0