File 7434-qemu-rlimit-as.patch of Package xen

# 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


Index: xen-4.0.2-testing/tools/ioemu-qemu-xen/vl.c
===================================================================
--- xen-4.0.2-testing.orig/tools/ioemu-qemu-xen/vl.c
+++ xen-4.0.2-testing/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)
openSUSE Build Service is sponsored by