--- linux-2.6.22-rc4-vs2.2.0-rc3/kernel/vserver/context.c 2007-06-15 02:37:04 +0200 +++ linux-2.6.22-rc4-vs2.2.0-rc3.1/kernel/vserver/context.c 2007-06-16 06:44:23 +0200 @@ -715,8 +715,19 @@ int vx_migrate_task(struct task_struct * /* hack for *spaces to provide compatibility */ if (unshare) { - ret = sys_unshare(CLONE_NEWUTS | CLONE_NEWIPC); + struct nsproxy *old_nsp = p->nsproxy; + struct nsproxy *new_nsp; + + ret = unshare_nsproxy_namespaces( + CLONE_NEWUTS | CLONE_NEWIPC, + &new_nsp, NULL); + if (ret) + goto out; + + new_nsp = xchg(&p->nsproxy, new_nsp); vx_set_space(vxi, CLONE_NEWUTS | CLONE_NEWIPC); + put_nsproxy(old_nsp); + put_nsproxy(new_nsp); } } out: --- linux-2.6.22-rc4-vs2.2.0-rc3/kernel/vserver/space.c 2007-06-15 07:06:26 +0200 +++ linux-2.6.22-rc4-vs2.2.0-rc3.1/kernel/vserver/space.c 2007-06-16 04:54:39 +0200 @@ -116,7 +116,6 @@ struct nsproxy *__vs_merge_nsproxy(struc if (mask) return vs_mix_nsproxy(old ? old : &null_proxy, proxy, mask); - get_nsproxy(proxy); return proxy; }