summaryrefslogtreecommitdiff
path: root/ipc/ipc_port.h
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-18 11:32:15 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-09-14 14:45:05 +0200
commit428d6a971cffaba40b0f8ea5f66c3a3e0c853e88 (patch)
tree40a755b03bea045582e25fbdb46d431ba581662d /ipc/ipc_port.h
parent22778b589af94261c2d8d0665220770d0b56d1a8 (diff)
ipc: fix locking issues
* ipc/ipc_port.h (struct ipc_port): Document locking exception. * ipc/ipc_port.c (ipc_port_destroy): Avoid accessing `port's fields without the lock. (ipc_port_alloc_special): Lock `port'. * ipc/mach_msg.c (mach_msg_trap): Avoid using `ipc_port_flag_protected_payload' on unlocked port. * ipc/ipc_kmsg.c (ipc_kmsg_copyout_header): Likewise.
Diffstat (limited to 'ipc/ipc_port.h')
-rw-r--r--ipc/ipc_port.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipc/ipc_port.h b/ipc/ipc_port.h
index ade6967..de43b42 100644
--- a/ipc/ipc_port.h
+++ b/ipc/ipc_port.h
@@ -82,6 +82,8 @@ struct ipc_port {
ipc_port_timestamp_t timestamp;
} data;
+ /* Note: For pagers (IKOT_PAGER), this field is protected by
+ vm_object_cache_lock. */
ipc_kobject_t ip_kobject;
mach_port_mscount_t ip_mscount;