It is unclear if this is really necessary. --- libports/complete-deallocate.c | 1 + libports/destroy-right.c | 3 +++ 2 files changed, 4 insertions(+)
diff --git a/libports/complete-deallocate.c b/libports/complete-deallocate.c index 8ce095b..6de97e3 100644 --- a/libports/complete-deallocate.c +++ b/libports/complete-deallocate.c @@ -30,6 +30,7 @@ _ports_complete_deallocate (struct port_info *pi) if (pi->port_right) { hurd_ihash_locp_remove (&pi->bucket->htable, pi->hentry); + mach_port_set_protected_payload (mach_task_self (), pi->port_right, 0); mach_port_mod_refs (mach_task_self (), pi->port_right, MACH_PORT_RIGHT_RECEIVE, -1); pi->port_right = MACH_PORT_NULL; diff --git a/libports/destroy-right.c b/libports/destroy-right.c index 65e19c7..2518c9e 100644 --- a/libports/destroy-right.c +++ b/libports/destroy-right.c @@ -32,6 +32,9 @@ ports_destroy_right (void *portstruct) { pthread_mutex_lock (&_ports_lock); hurd_ihash_locp_remove (&pi->bucket->htable, pi->hentry); + mach_port_set_protected_payload (mach_task_self (), + pi->port_right, + 0); err = mach_port_mod_refs (mach_task_self (), pi->port_right, MACH_PORT_RIGHT_RECEIVE, -1); assert_perror (err); -- 1.7.10.4