diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre2/include/linux/vs_context.h linux-2.6.11.7-vs2.0-pre2.1/include/linux/vs_context.h --- linux-2.6.11.7-vs2.0-pre2/include/linux/vs_context.h 2005-04-14 21:19:29 +0200 +++ linux-2.6.11.7-vs2.0-pre2.1/include/linux/vs_context.h 2005-04-23 22:41:12 +0200 @@ -160,6 +160,12 @@ static __inline__ struct vx_info *__task } +static inline void __wakeup_vx_info(struct vx_info *vxi) +{ + if (waitqueue_active(&vxi->vx_wait)) + wake_up_interruptible(&vxi->vx_wait); +} + #else #warning duplicate inclusion #endif diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre2/include/linux/vserver/context.h linux-2.6.11.7-vs2.0-pre2.1/include/linux/vserver/context.h --- linux-2.6.11.7-vs2.0-pre2/include/linux/vserver/context.h 2005-04-14 21:19:29 +0200 +++ linux-2.6.11.7-vs2.0-pre2.1/include/linux/vserver/context.h 2005-04-23 23:34:54 +0200 @@ -94,7 +96,7 @@ struct vx_info { pid_t vx_initpid; /* PID of fake init process */ spinlock_t vx_lock; - wait_queue_head_t vx_exit; /* context exit waitqueue */ + wait_queue_head_t vx_wait; /* context exit waitqueue */ struct _vx_limit limit; /* vserver limits */ struct _vx_sched sched; /* vserver scheduler */ diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre2/kernel/vserver/context.c linux-2.6.11.7-vs2.0-pre2.1/kernel/vserver/context.c --- linux-2.6.11.7-vs2.0-pre2/kernel/vserver/context.c 2005-04-14 21:19:29 +0200 +++ linux-2.6.11.7-vs2.0-pre2.1/kernel/vserver/context.c 2005-04-23 23:30:35 +0200 @@ -66,7 +66,7 @@ static struct vx_info *__alloc_vx_info(x new->vx_parent = NULL; new->vx_state = 0; new->vx_lock = SPIN_LOCK_UNLOCKED; - init_waitqueue_head(&new->vx_exit); + init_waitqueue_head(&new->vx_wait); /* rest of init goes here */ vx_info_init_limit(&new->limit); @@ -391,6 +390,7 @@ void unhash_vx_info(struct vx_info *vxi) spin_lock(&vx_info_hash_lock); __unhash_vx_info(vxi); spin_unlock(&vx_info_hash_lock); + __wakeup_vx_info(vxi); } diff -NurpP --minimal linux-2.6.11.7-vs2.0-pre2/kernel/vserver/signal.c linux-2.6.11.7-vs2.0-pre2.1/kernel/vserver/signal.c --- linux-2.6.11.7-vs2.0-pre2/kernel/vserver/signal.c 2005-04-14 21:19:29 +0200 +++ linux-2.6.11.7-vs2.0-pre2.1/kernel/vserver/signal.c 2005-04-23 22:42:41 +0200 @@ -95,11 +95,11 @@ static int __wait_exit(struct vx_info *v DECLARE_WAITQUEUE(wait, current); int ret = 0; - add_wait_queue(&vxi->vx_exit, &wait); + add_wait_queue(&vxi->vx_wait, &wait); set_current_state(TASK_INTERRUPTIBLE); wait: - if (vx_info_state(vxi, VXS_DEFUNCT)) + if (vx_info_state(vxi, VXS_SHUTDOWN|VXS_HASHED) == VXS_SHUTDOWN) goto out; if (signal_pending(current)) { ret = -ERESTARTSYS; @@ -110,7 +110,7 @@ wait: out: set_current_state(TASK_RUNNING); - remove_wait_queue(&vxi->vx_exit, &wait); + remove_wait_queue(&vxi->vx_wait, &wait); return ret; }