diff options
Diffstat (limited to 'vserver-sources/old/2.1.1_rc27/4413_vs2.1.1-vxret-fix01.patch')
-rw-r--r-- | vserver-sources/old/2.1.1_rc27/4413_vs2.1.1-vxret-fix01.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/vserver-sources/old/2.1.1_rc27/4413_vs2.1.1-vxret-fix01.patch b/vserver-sources/old/2.1.1_rc27/4413_vs2.1.1-vxret-fix01.patch new file mode 100644 index 0000000..3eb9d2b --- /dev/null +++ b/vserver-sources/old/2.1.1_rc27/4413_vs2.1.1-vxret-fix01.patch @@ -0,0 +1,60 @@ +Index: linux-2.6.17/kernel/vserver/context.c +=================================================================== +--- linux-2.6.17.orig/kernel/vserver/context.c ++++ linux-2.6.17/kernel/vserver/context.c +@@ -847,16 +847,21 @@ int vc_ctx_create(uint32_t xid, void __u + int vc_ctx_migrate(struct vx_info *vxi, void __user *data) + { + struct vcmd_ctx_migrate vc_data = { .flagword = 0 }; ++ int ret; + + if (data && copy_from_user (&vc_data, data, sizeof(vc_data))) + return -EFAULT; + +- vx_migrate_task(current, vxi); ++ ret = vx_migrate_task(current, vxi); ++ if (ret) ++ return ret; + if (vc_data.flagword & VXM_SET_INIT) +- vx_set_init(vxi, current); ++ ret = vx_set_init(vxi, current); ++ if (ret) ++ return ret; + if (vc_data.flagword & VXM_SET_REAPER) +- vx_set_reaper(vxi, current); +- return 0; ++ ret = vx_set_reaper(vxi, current); ++ return ret; + } + + +@@ -890,8 +895,14 @@ int vc_set_cflags(struct vx_info *vxi, v + if (trigger & VXF_STATE_SETUP) + vx_mask_cap_bset(vxi, current); + if (trigger & VXF_STATE_INIT) { +- vx_set_init(vxi, current); +- vx_set_reaper(vxi, current); ++ int ret; ++ ++ ret = vx_set_init(vxi, current); ++ if (ret) ++ return ret; ++ ret = vx_set_reaper(vxi, current); ++ if (ret) ++ return ret; + } + } + +Index: linux-2.6.17/kernel/vserver/switch.c +=================================================================== +--- linux-2.6.17.orig/kernel/vserver/switch.c ++++ linux-2.6.17/kernel/vserver/switch.c +@@ -335,7 +335,7 @@ long do_vserver(uint32_t cmd, uint32_t i + VC_VERSION(cmd), id, data, compat, + perm, args, flags); + +- ret = -EPERM; ++ ret = -ENOSYS; + if (perm < 0) + goto out; + |