]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sane mlock_limit
authorAndrew Morton <akpm@osdl.org>
Fri, 27 Aug 2004 03:37:13 +0000 (20:37 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 27 Aug 2004 03:37:13 +0000 (20:37 -0700)
As David M-T points out, the default per-user mlock limit should be at least a
single page.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/resource.h

index b930c9cb77271039e5a77a811bb6e5677418b158..21a86cb6acdb63a95f91da65872b3643d700b2ff 100644 (file)
@@ -59,7 +59,7 @@ struct rlimit {
  * GPG wants 32kB of mlocked memory, to make sure pass phrases
  * and other sensitive information are never written to disk.
  */
-#define MLOCK_LIMIT    (32*1024)
+#define MLOCK_LIMIT    (8 * PAGE_SIZE)
 
 /*
  * Due to binary compatibility, the actual resource numbers