summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-04-06 02:38:23 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-04-06 02:38:23 +0200
commit899d69cc267b3d07ea3eeea91cf10a5a32dac985 (patch)
treeeb14bd9cb03e18b02ceaf42a5ec9f4a63266a342
parentda8c9a7e035df0ad9e748caacc654b23a5901af9 (diff)
bootstrap: Add missing reference to send port between tasks
When giving the port to a bootstrap task to another bootstrap task, we need to add a reference. This shows up on error-cleanup (e.g. when forgetting to define the root). * kern/bootstrap.c (boot_script_insert_task_port): Call ipc_port_make_send on `task''s itk_sself.
-rw-r--r--kern/bootstrap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index c7b18b1d..00064cef 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -898,6 +898,7 @@ boot_script_insert_right (struct cmd *cmd, mach_port_t port, mach_port_t *name)
int
boot_script_insert_task_port (struct cmd *cmd, task_t task, mach_port_t *name)
{
- *name = task_insert_send_right (cmd->task, task->itk_sself);
+ *name = task_insert_send_right (cmd->task,
+ ipc_port_make_send(task->itk_sself));
return 0;
}