summaryrefslogtreecommitdiff
path: root/libfshelp/fetch-root.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-09-22 23:53:19 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-09-22 23:53:19 +0200
commitea9d181f270aa903a2f31d2d00deb18c1be9792e (patch)
tree27f3855ac9375e08f92464cbc2e0659c4d2404b5 /libfshelp/fetch-root.c
parent131ce3a37dc93eaa62f3b7643772afa9276ed2d5 (diff)
Fix spurious destroy during RPC to self with rendez-vous
In that case we have two receive right references, which we should consume one per one, instead of destroying them all at once (and thus fail on second destroy) http://lists.gnu.org/archive/html/bug-hurd/2011-03/msg00045.html * libfshelp/fetch-root.c (fshelp_fetch_root): Unreference rendez-vous port receive right instead of destroying the port. * libshouldbeinlibc/exec-reauth.c (exec_reauth): Likewise.
Diffstat (limited to 'libfshelp/fetch-root.c')
-rw-r--r--libfshelp/fetch-root.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index 54d3c0ca..eb569896 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -79,7 +79,7 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
if (err)
ret = MACH_PORT_NULL;
- mach_port_destroy (mach_task_self (), rend);
+ mach_port_mod_refs (mach_task_self (), rend, MACH_PORT_RIGHT_RECEIVE, -1);
return ret;
}