projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s/limit/vlimit
[unix-history]
/
usr
/
src
/
sys
/
kern
/
kern_proc.c
diff --git
a/usr/src/sys/kern/kern_proc.c
b/usr/src/sys/kern/kern_proc.c
index
0b8fde9
..
f018c3a
100644
(file)
--- a/
usr/src/sys/kern/kern_proc.c
+++ b/
usr/src/sys/kern/kern_proc.c
@@
-1,4
+1,4
@@
-/* kern_proc.c 3.1
5
%G% */
+/* kern_proc.c 3.1
9
%G% */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
@@
-17,6
+17,7
@@
#include "../h/vm.h"
#include "../h/text.h"
#include "../h/psl.h"
#include "../h/vm.h"
#include "../h/text.h"
#include "../h/psl.h"
+#include "../h/limit.h"
/*
* exec system call, with and without environments.
/*
* exec system call, with and without environments.
@@
-467,6
+468,7
@@
exit(rv)
plock(u.u_rdir);
iput(u.u_rdir);
}
plock(u.u_rdir);
iput(u.u_rdir);
}
+ u.u_limit[LIM_FSIZE] = INFINITY;
acct();
vrelpt(u.u_procp);
vrelu(u.u_procp, 0);
acct();
vrelpt(u.u_procp);
vrelu(u.u_procp, 0);
@@
-684,6
+686,10
@@
sbreak()
if (n < 0)
n = 0;
d = clrnd(n - u.u_dsize);
if (n < 0)
n = 0;
d = clrnd(n - u.u_dsize);
+ if (ctob(u.u_dsize+d) > u.u_limit[LIM_DATA]) {
+ u.u_error = ENOMEM;
+ return;
+ }
if (chksize(u.u_tsize, u.u_dsize+d, u.u_ssize))
return;
if (swpexpand(u.u_dsize+d, u.u_ssize, &u.u_dmap, &u.u_smap)==0)
if (chksize(u.u_tsize, u.u_dsize+d, u.u_ssize))
return;
if (swpexpand(u.u_dsize+d, u.u_ssize, &u.u_dmap, &u.u_smap)==0)