summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mach_port.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ipc/mach_port.c b/ipc/mach_port.c
index 17aaf88..4315e80 100644
--- a/ipc/mach_port.c
+++ b/ipc/mach_port.c
@@ -602,8 +602,13 @@ mach_port_deallocate(
return KERN_INVALID_TASK;
kr = ipc_right_lookup_write(space, name, &entry);
- if (kr != KERN_SUCCESS)
+ if (kr != KERN_SUCCESS) {
+ if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD) {
+ printf("task %p deallocating an invalid port %u, most probably a bug.\n", current_task(), name);
+ SoftDebugger("mach_port_deallocate");
+ }
return kr;
+ }
/* space is write-locked */
kr = ipc_right_dealloc(space, name, entry); /* unlocks space */