156c5c55da
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=51a5937e3a08f72bc642b13184758743
59 lines
1.7 KiB
Diff
59 lines
1.7 KiB
Diff
Index: src/lxc/lxc_container.c
|
|
===================================================================
|
|
--- src/lxc/lxc_container.c.orig
|
|
+++ src/lxc/lxc_container.c
|
|
@@ -831,6 +831,9 @@ int lxcContainerStart(virDomainDefPtr de
|
|
lxc_child_argv_t args = { def, nveths, veths, control, ttyPath };
|
|
|
|
/* allocate a stack for the container */
|
|
+#ifdef __ia64__
|
|
+ stacksize *= 2;
|
|
+#endif
|
|
if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
|
virReportOOMError();
|
|
return -1;
|
|
@@ -849,7 +852,11 @@ int lxcContainerStart(virDomainDefPtr de
|
|
flags |= CLONE_NEWNET;
|
|
}
|
|
|
|
+#ifdef __ia64__
|
|
+ pid = __clone2(lxcContainerChild, stack, stacksize, flags, &args);
|
|
+#else
|
|
pid = clone(lxcContainerChild, stacktop, flags, &args);
|
|
+#endif
|
|
VIR_FREE(stack);
|
|
DEBUG("clone() completed, new container PID is %d", pid);
|
|
|
|
@@ -875,6 +882,7 @@ int lxcContainerAvailable(int features)
|
|
char *childStack;
|
|
char *stack;
|
|
int childStatus;
|
|
+ int stacksize = getpagesize() * 4;
|
|
|
|
if (features & LXC_CONTAINER_FEATURE_USER)
|
|
flags |= CLONE_NEWUSER;
|
|
@@ -882,14 +890,21 @@ int lxcContainerAvailable(int features)
|
|
if (features & LXC_CONTAINER_FEATURE_NET)
|
|
flags |= CLONE_NEWNET;
|
|
|
|
- if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0) {
|
|
+#ifdef __ia64__
|
|
+ stacksize *= 2;
|
|
+#endif
|
|
+ if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
|
DEBUG0("Unable to allocate stack");
|
|
return -1;
|
|
}
|
|
|
|
- childStack = stack + (getpagesize() * 4);
|
|
+ childStack = stack + stacksize;
|
|
|
|
+#ifdef __ia64__
|
|
+ cpid = __clone2(lxcContainerDummyChild, stack, stacksize, flags, NULL);
|
|
+#else
|
|
cpid = clone(lxcContainerDummyChild, childStack, flags, NULL);
|
|
+#endif
|
|
VIR_FREE(stack);
|
|
if (cpid < 0) {
|
|
char ebuf[1024];
|