aboutsummaryrefslogtreecommitdiff
path: root/libmachdev
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-08-11 15:23:10 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-08-11 15:23:10 +0200
commit9be1e099f5343e752a9fe56fba562c4f108015e7 (patch)
tree27ab3f49e7962b90fa528c5b42906afc00ad9e73 /libmachdev
parentf71981b762336be173e76fc40b872a9dcafc3b5f (diff)
downloadhurd-9be1e099f5343e752a9fe56fba562c4f108015e7.tar.gz
hurd-9be1e099f5343e752a9fe56fba562c4f108015e7.tar.bz2
hurd-9be1e099f5343e752a9fe56fba562c4f108015e7.zip
bootstrap: Fix passing proc server from FS to rumpdisk
libdiskfs was passing its own proc port, thus confusing the fsys_init call in rumpdisk.
Diffstat (limited to 'libmachdev')
-rw-r--r--libmachdev/trivfs_server.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c
index 9c604595..5d7a1300 100644
--- a/libmachdev/trivfs_server.c
+++ b/libmachdev/trivfs_server.c
@@ -289,16 +289,26 @@ trivfs_S_fsys_init (struct trivfs_control *fsys,
retry_type retry;
string_t retry_name;
mach_port_t right = MACH_PORT_NULL;
- process_t parent_proc;
/* Traverse to the bootstrapping server first */
task_get_bootstrap_port (mach_task_self (), &bootstrap);
if (bootstrap)
{
+ process_t parent_proc;
+
err = proc_task2proc (procserver, parent_task, &parent_proc);
assert_perror_backtrace (err);
+
+ /* We don't need this anymore. */
+ mach_port_deallocate (mach_task_self (), parent_task);
+ parent_task = MACH_PORT_NULL;
+
+ proc_mark_exec(parent_proc);
+
err = fsys_init (bootstrap, parent_proc, MACH_MSG_TYPE_COPY_SEND, authhandle);
assert_perror_backtrace (err);
+
+ mach_port_deallocate (mach_task_self (), parent_proc);
}
err = fsys_getroot (control_port, MACH_PORT_NULL, MACH_MSG_TYPE_COPY_SEND,
idlist, 3, idlist, 3, 0,