]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/ipc_host.c
xnu-3789.51.2.tar.gz
[apple/xnu.git] / osfmk / kern / ipc_host.c
index b68bd0a0902888f5410960603055d742c6f2e94b..8e61a5dfea38d62650e1232f17f839dd655e4a09 100644 (file)
@@ -167,10 +167,13 @@ mach_port_name_t
 host_self_trap(
        __unused struct host_self_trap_args *args)
 {
 host_self_trap(
        __unused struct host_self_trap_args *args)
 {
+       task_t self = current_task();
        ipc_port_t sright;
        mach_port_name_t name;
 
        ipc_port_t sright;
        mach_port_name_t name;
 
-       sright = ipc_port_copy_send(current_task()->itk_host);
+       itk_lock(self);
+       sright = ipc_port_copy_send(self->itk_host);
+       itk_unlock(self);
        name = ipc_port_copyout_send(sright, current_space());
        return name;
 }
        name = ipc_port_copyout_send(sright, current_space());
        return name;
 }