diff -NurpP linux-2.6.14.2-vs2.1.0-rc8.1/include/linux/vserver/context.h linux-2.6.14.2-vs2.1.0-rc8.2/include/linux/vserver/context.h --- linux-2.6.14.2-vs2.1.0-rc8.1/include/linux/vserver/context.h 2005-11-16 05:11:49 +0100 +++ linux-2.6.14.2-vs2.1.0-rc8.2/include/linux/vserver/context.h 2005-12-01 02:58:19 +0100 @@ -5,7 +5,12 @@ #define MAX_S_CONTEXT 65535 /* Arbitrary limit */ + +#ifdef CONFIG_VSERVER_DYNAMIC_IDS #define MIN_D_CONTEXT 49152 /* dynamic contexts start here */ +#else +#define MIN_D_CONTEXT 65536 +#endif #define VX_DYNAMIC_ID ((uint32_t)-1) /* id for dynamic context */ diff -NurpP linux-2.6.14.2-vs2.1.0-rc8.1/kernel/vserver/Kconfig linux-2.6.14.2-vs2.1.0-rc8.2/kernel/vserver/Kconfig --- linux-2.6.14.2-vs2.1.0-rc8.1/kernel/vserver/Kconfig 2005-10-29 03:28:54 +0200 +++ linux-2.6.14.2-vs2.1.0-rc8.2/kernel/vserver/Kconfig 2005-12-01 21:54:31 +0100 @@ -44,6 +44,15 @@ config VSERVER_LEGACY_VERSION so better avoid it, unless you really, really need it for backwards compatibility. +config VSERVER_DYNAMIC_IDS + bool "Enable dynamic context IDs" + depends on VSERVER_LEGACY + default n + help + This enables support of in kernel dynamic context IDs, + which is deprecated and will probably be removed in the + next release. + config VSERVER_NGNET bool "Disable Legacy Networking Kernel API" depends on EXPERIMENTAL @@ -58,10 +67,10 @@ config VSERVER_COWBL depends on EXPERIMENTAL default y help - This enables the COW link break code which will allow to - treat unified files like normal files in regard of writing - to them (which will implicitely break the link and create - a copy of the unified file) + This enables the COW (Copy-On-Write) link break code. + It allows you to treat unified files like normal files + when writing to them (which will implicitely break the + link and create a copy of the unified file) config VSERVER_PROC_SECURE bool "Enable Proc Security" diff -NurpP linux-2.6.14.2-vs2.1.0-rc8.1/kernel/vserver/context.c linux-2.6.14.2-vs2.1.0-rc8.2/kernel/vserver/context.c --- linux-2.6.14.2-vs2.1.0-rc8.1/kernel/vserver/context.c 2005-11-18 16:10:39 +0100 +++ linux-2.6.14.2-vs2.1.0-rc8.2/kernel/vserver/context.c 2005-12-01 03:01:30 +0100 @@ -298,12 +298,17 @@ static struct vx_info * __loc_vx_info(in /* dynamic context requested */ if (id == VX_DYNAMIC_ID) { +#ifdef CONFIG_VSERVER_DYNAMIC_IDS id = __vx_dynamic_id(); if (!id) { printk(KERN_ERR "no dynamic context available.\n"); goto out_unlock; } new->vx_id = id; +#else + printk(KERN_ERR "dynamic contexts disabled.\n"); + goto out_unlock; +#endif } /* existing context requested */ else if ((vxi = __lookup_vx_info(id))) { @@ -358,6 +363,7 @@ static struct vx_info * __create_vx_info /* dynamic context requested */ if (id == VX_DYNAMIC_ID) { +#ifdef CONFIG_VSERVER_DYNAMIC_IDS id = __vx_dynamic_id(); if (!id) { printk(KERN_ERR "no dynamic context available.\n"); @@ -365,6 +371,11 @@ static struct vx_info * __create_vx_info goto out_unlock; } new->vx_id = id; +#else + printk(KERN_ERR "dynamic contexts disabled.\n"); + vxi = ERR_PTR(-EINVAL); + goto out_unlock; +#endif } /* static context requested */ else if ((vxi = __lookup_vx_info(id))) { @@ -376,6 +387,7 @@ static struct vx_info * __create_vx_info vxi = ERR_PTR(-EEXIST); goto out_unlock; } +#ifdef CONFIG_VSERVER_DYNAMIC_IDS /* dynamic xid creation blocker */ else if (id >= MIN_D_CONTEXT) { vxdprintk(VXD_CBIT(xid, 0), @@ -383,6 +395,7 @@ static struct vx_info * __create_vx_info vxi = ERR_PTR(-EINVAL); goto out_unlock; } +#endif /* new context */ vxdprintk(VXD_CBIT(xid, 0), diff -NurpP linux-2.6.14.2-vs2.1.0-rc8.1/kernel/vserver/network.c linux-2.6.14.2-vs2.1.0-rc8.2/kernel/vserver/network.c --- linux-2.6.14.2-vs2.1.0-rc8.1/kernel/vserver/network.c 2005-11-06 00:54:55 +0100 +++ linux-2.6.14.2-vs2.1.0-rc8.2/kernel/vserver/network.c 2005-12-01 03:01:41 +0100 @@ -221,6 +221,7 @@ static struct nx_info * __create_nx_info /* dynamic context requested */ if (id == NX_DYNAMIC_ID) { +#ifdef CONFIG_VSERVER_DYNAMIC_IDS id = __nx_dynamic_id(); if (!id) { printk(KERN_ERR "no dynamic context available.\n"); @@ -228,6 +229,11 @@ static struct nx_info * __create_nx_info goto out_unlock; } new->nx_id = id; +#else + printk(KERN_ERR "dynamic contexts disabled.\n"); + nxi = ERR_PTR(-EINVAL); + goto out_unlock; +#endif } /* static context requested */ else if ((nxi = __lookup_nx_info(id))) {