summaryrefslogtreecommitdiff
path: root/kern/bootstrap.c
diff options
context:
space:
mode:
authorJustus Winter <teythoon@avior.uberspace.de>2017-10-26 17:38:30 +0200
committerJustus Winter <teythoon@avior.uberspace.de>2017-10-26 18:25:12 +0200
commit10ebf9565f69760e46a8f271e22c5367d54e10ff (patch)
tree4c60dcf6e2056d50f2da1ca2cc889ff41f7138c3 /kern/bootstrap.c
parentd7d4740699431889f44fc7ce16f083eaa31f907e (diff)
kern: Fix crash.
Check receiver in task_create. Fixes a crash when sending that message to a non-task port. * kern/bootstrap.c (boot_script_task_create): Use the new function. * kern/task.c (task_create): Rename to task_create_internal, create a new function in its place that checks the receiver first. * kern/task.h (task_create_internal): New prototype.
Diffstat (limited to 'kern/bootstrap.c')
-rw-r--r--kern/bootstrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index 18b6b182..8b88d17d 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -819,7 +819,7 @@ boot_script_free (void *ptr, unsigned int size)
int
boot_script_task_create (struct cmd *cmd)
{
- kern_return_t rc = task_create(TASK_NULL, FALSE, &cmd->task);
+ kern_return_t rc = task_create_kernel(TASK_NULL, FALSE, &cmd->task);
if (rc)
{
printf("boot_script_task_create failed with %x\n", rc);