Only enter the namespaces for static and dynamic xids (i.e. not the spectator).
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Fri, 8 Dec 2006 15:35:24 +0000 (15:35 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Fri, 8 Dec 2006 15:35:24 +0000 (15:35 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2419 94cd875c-1c1d-0410-91d2-eb244daf1a30

lib/syscall_ctxmigrate-v21.hc

index ca6666f..355a7a1 100644 (file)
 static inline ALWAYSINLINE int
 vc_ctx_migrate_spaces(xid_t xid)
 {
-  int ret;
-
-  ret = vc_enter_namespace(xid, vc_get_space_mask() & ~(CLONE_NEWNS|CLONE_FS));
-  if (ret)
-    return ret;
+  int ret = vc_getXIDType(xid);
+  if (ret == vcTYPE_STATIC || ret == vcTYPE_DYNAMIC) {
+    ret = vc_enter_namespace(xid, vc_get_space_mask() & ~(CLONE_NEWNS|CLONE_FS));
+    if (ret)
+      return ret;
+  }
 
   return vserver(VCMD_ctx_migrate_v0, CTX_USER2KERNEL(xid), NULL);
 }