From 899d69cc267b3d07ea3eeea91cf10a5a32dac985 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 6 Apr 2020 02:38:23 +0200 Subject: 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. --- kern/bootstrap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kern/bootstrap.c') 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; } -- cgit v1.2.3