]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fixing mlockall & PROT_NONE
authorAndi Kleen <ak@colin2.muc.de>
Mon, 13 Oct 2003 04:24:49 +0000 (21:24 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 13 Oct 2003 04:24:49 +0000 (21:24 -0700)
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

index 6f026bdd68e59733383db4747c46a6f4aaa4ca62..0cf446b5f38323c3b20c7242b52db103d16756aa 100644 (file)
@@ -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;
 }