* [PATCH] remove duplicate rlim assignment in acct_stack_growth()
@ 2005-01-11 0:42 Chris Wright
2005-01-11 3:49 ` [PATCH] acct_stack_growth nitpicks Chris Wright
0 siblings, 1 reply; 2+ messages in thread
From: Chris Wright @ 2005-01-11 0:42 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
remove duplicate rlim assignment in acct_stack_growth()
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 16:29:06 -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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] acct_stack_growth nitpicks
2005-01-11 0:42 [PATCH] remove duplicate rlim assignment in acct_stack_growth() Chris Wright
@ 2005-01-11 3:49 ` Chris Wright
0 siblings, 0 replies; 2+ messages in thread
From: Chris Wright @ 2005-01-11 3:49 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
- 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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-11 3:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-11 0:42 [PATCH] remove duplicate rlim assignment in acct_stack_growth() Chris Wright
2005-01-11 3:49 ` [PATCH] acct_stack_growth nitpicks Chris Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).