diff -NurpP linux-2.6.22.6-vs2.3.0.24.5/kernel/vserver/context.c linux-2.6.22.6-vs2.3.0.24.6/kernel/vserver/context.c --- linux-2.6.22.6-vs2.3.0.24.5/kernel/vserver/context.c 2007-09-18 15:33:24 +0200 +++ linux-2.6.22.6-vs2.3.0.24.6/kernel/vserver/context.c 2007-09-30 14:00:50 +0200 @@ -189,14 +189,16 @@ void free_vx_info(struct vx_info *vxi) { unsigned long flags; - /* context shutdown is mandatory */ - BUG_ON(!vx_info_state(vxi, VXS_SHUTDOWN)); - + /* check for reference counts first */ BUG_ON(atomic_read(&vxi->vx_usecnt)); BUG_ON(atomic_read(&vxi->vx_tasks)); + /* context must not be hashed */ BUG_ON(vx_info_state(vxi, VXS_HASHED)); + /* context shutdown is mandatory */ + BUG_ON(!vx_info_state(vxi, VXS_SHUTDOWN)); + BUG_ON(vxi->vx_nsproxy); BUG_ON(vxi->vx_fs);