Messages in this thread Patch in this message | | | Date | Mon, 10 Jan 2005 19:49:36 -0800 | From | Chris Wright <> | Subject | [PATCH] acct_stack_growth nitpicks |
| |
- remove duplicate rlim assignment in acct_stack_growth() - allow CAP_IPC_LOCK to override mlock rlimit during stack expansion as in all other cases
Signed-off-by: Chris Wright <chrisw@osdl.org>
===== mm/mmap.c 1.155 vs edited ===== --- 1.155/mm/mmap.c 2005-01-10 11:23:35 -08:00 +++ edited/mm/mmap.c 2005-01-10 19:34:05 -08:00 @@ -1346,7 +1346,6 @@ static int acct_stack_growth(struct vm_a struct rlimit *rlim = current->signal->rlim; /* address space limit tests */ - rlim = current->signal->rlim; if (mm->total_vm + grow > rlim[RLIMIT_AS].rlim_cur >> PAGE_SHIFT) return -ENOMEM; @@ -1360,7 +1359,7 @@ static int acct_stack_growth(struct vm_a 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; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |