Commit 09207038 authored by Chris Wright's avatar Chris Wright Committed by Linus Torvalds

[PATCH] acct_stack_growth nitpicks

- allow CAP_IPC_LOCK to override mlock rlimit during stack expansion as
  in all other cases
Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 095f1474
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment