diff -r de57c3f218fb drivers/xen/evtchn/evtchn.c --- a/drivers/xen/evtchn/evtchn.c Thu Mar 20 11:35:25 2008 +0000 +++ b/drivers/xen/evtchn/evtchn.c Wed Apr 02 21:59:29 2008 +0200 @@ -346,9 +346,12 @@ static long evtchn_ioctl(struct file *fi spin_unlock_irq(&port_user_lock); break; } + port_user[unbind.port] = NULL; + mask_evtchn(unbind.port); + rebind_evtchn_to_cpu(unbind.port, 0); spin_unlock_irq(&port_user_lock); @@ -457,7 +460,9 @@ static int evtchn_release(struct inode * continue; port_user[i] = NULL; + mask_evtchn(i); + rebind_evtchn_to_cpu(i, 0); close.port = i; ret = HYPERVISOR_event_channel_op(EVTCHNOP_close, &close);