35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
|
# HG changeset patch
|
||
|
# User Jan Beulich <jbeulich@novell.com>
|
||
|
# Date 1294771190 0
|
||
|
# Node ID d224cef9d82c5c1ba9a6d73ca2628f288ce6f434
|
||
|
# Parent a283996796c91dd29ecff444b78798e0ce902047
|
||
|
bump RLIMIT_AS if restricted
|
||
|
References: bnc#641419
|
||
|
|
||
|
Mostly the same as is already being done for several other RLIMIT_*
|
||
|
values.
|
||
|
|
||
|
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||
|
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|
||
|
|
||
|
committer: Ian Jackson <Ian.Jackson@eu.citrix.com>
|
||
|
git-commit-id: 2aa36d470e97f4baa219f78df82e2d3fe3d9f96d
|
||
|
|
||
|
|
||
|
--- a/tools/ioemu-qemu-xen/vl.c
|
||
|
+++ b/tools/ioemu-qemu-xen/vl.c
|
||
|
@@ -4845,6 +4845,13 @@ int main(int argc, char **argv, char **e
|
||
|
rl.rlim_cur = rl.rlim_max;
|
||
|
if (setrlimit(RLIMIT_DATA, &rl) != 0)
|
||
|
perror("setrlimit(RLIMIT_DATA)");
|
||
|
+ if (getrlimit(RLIMIT_AS, &rl) == 0) {
|
||
|
+ rl.rlim_cur = rl.rlim_max;
|
||
|
+ if (setrlimit(RLIMIT_AS, &rl) != 0)
|
||
|
+ perror("setrlimit(RLIMIT_AS)");
|
||
|
+ } else {
|
||
|
+ perror("getrlimit(RLIMIT_AS)");
|
||
|
+ }
|
||
|
rl.rlim_cur = RLIM_INFINITY;
|
||
|
rl.rlim_max = RLIM_INFINITY;
|
||
|
if (setrlimit(RLIMIT_RSS, &rl) != 0)
|