aboutsummaryrefslogtreecommitdiff
path: root/ipc/mach_msg.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-11-18 21:36:44 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-11-18 21:41:52 +0100
commit383379ae770fd6a74c592006f46986320df9fa30 (patch)
treef4d228438e4f350a21b39cb153eb60b048a8690e /ipc/mach_msg.c
parent2f899c323e850ec9cab35f24315f28ef62021957 (diff)
downloadgnumach-383379ae770fd6a74c592006f46986320df9fa30.tar.gz
gnumach-383379ae770fd6a74c592006f46986320df9fa30.tar.bz2
gnumach-383379ae770fd6a74c592006f46986320df9fa30.zip
ipc_entry_lookup: Generalize warnings about bogus port names
Looking up a bogus port name is generally a sign of a real bug, such as a spurious mach port deallocation.
Diffstat (limited to 'ipc/mach_msg.c')
-rw-r--r--ipc/mach_msg.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ipc/mach_msg.c b/ipc/mach_msg.c
index 118ce4b3..abeeb643 100644
--- a/ipc/mach_msg.c
+++ b/ipc/mach_msg.c
@@ -495,7 +495,10 @@ mach_msg_trap(
ipc_entry_t entry;
entry = ipc_entry_lookup (space, reply_name);
if (entry == IE_NULL)
+ {
+ ipc_entry_lookup_failed (reply_name);
goto abort_request_copyin;
+ }
reply_port = (ipc_port_t) entry->ie_object;
assert(reply_port != IP_NULL);
}
@@ -508,7 +511,10 @@ mach_msg_trap(
ipc_entry_bits_t bits;
entry = ipc_entry_lookup (space, dest_name);
if (entry == IE_NULL)
+ {
+ ipc_entry_lookup_failed (dest_name);
goto abort_request_copyin;
+ }
bits = entry->ie_bits;
/* check type bits */
@@ -620,7 +626,10 @@ mach_msg_trap(
entry = ipc_entry_lookup (space, dest_name);
if (entry == IE_NULL)
+ {
+ ipc_entry_lookup_failed (dest_name);
goto abort_reply_dest_copyin;
+ }
/* check type bits */
if (IE_BITS_TYPE (entry->ie_bits) !=
@@ -668,7 +677,10 @@ mach_msg_trap(
ipc_entry_bits_t bits;
entry = ipc_entry_lookup (space, rcv_name);
if (entry == IE_NULL)
+ {
+ ipc_entry_lookup_failed (rcv_name);
goto abort_reply_rcv_copyin;
+ }
bits = entry->ie_bits;
/* check type bits; looking for receive or set */