aboutsummaryrefslogtreecommitdiff
path: root/kern/task.h
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/task.h
parentd7d4740699431889f44fc7ce16f083eaa31f907e (diff)
downloadgnumach-10ebf9565f69760e46a8f271e22c5367d54e10ff.tar.gz
gnumach-10ebf9565f69760e46a8f271e22c5367d54e10ff.tar.bz2
gnumach-10ebf9565f69760e46a8f271e22c5367d54e10ff.zip
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/task.h')
-rw-r--r--kern/task.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/kern/task.h b/kern/task.h
index 2a4c28fc..0b746aff 100644
--- a/kern/task.h
+++ b/kern/task.h
@@ -140,6 +140,10 @@ extern kern_return_t task_create(
task_t parent_task,
boolean_t inherit_memory,
task_t *child_task);
+extern kern_return_t task_create_kernel(
+ task_t parent_task,
+ boolean_t inherit_memory,
+ task_t *child_task);
extern kern_return_t task_terminate(
task_t task);
extern kern_return_t task_suspend(