diff options
author | Chris Wright <chrisw@osdl.org> | 2005-01-10 15:40:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-10 15:40:07 -0800 |
commit | 092070386eaa3afc8e2375287bec98369736fc48 (patch) | |
tree | 69c3ce29c8048a7199cdc7831cdaabd8e72e89bf /mm | |
parent | 095f1474e9b4a6d8b5bbb74b49cf2c0b5fe41483 (diff) | |
download | history-092070386eaa3afc8e2375287bec98369736fc48.tar.gz |
[PATCH] acct_stack_growth nitpicks
- allow CAP_IPC_LOCK to override mlock rlimit during stack expansion as
in all other cases
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 06c3be61de8025..ca45a0e92e3b35 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1359,7 +1359,7 @@ static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, un unsigned long limit; locked = mm->locked_vm + grow; limit = rlim[RLIMIT_MEMLOCK].rlim_cur >> PAGE_SHIFT; - if (locked > limit) + if (locked > limit && !capable(CAP_IPC_LOCK)) return -ENOMEM; } |