From e1f856119dae48fcc1b649521ca45e4bdaa80ea9 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 10 Aug 2011 03:36:44 +0200 Subject: Do not warn for cross-space spurious port deallocation These are harmless (the target is stopped) and difficult to fix anyway. * ipc/mach_port.c (mach_port_destroy): Do not warn about spurious port deallocation when SPACE is not equal to current_space(). (mach_port_deallocate): Likewise. --- ipc/mach_port.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ipc') diff --git a/ipc/mach_port.c b/ipc/mach_port.c index 8930661..c5688c9 100644 --- a/ipc/mach_port.c +++ b/ipc/mach_port.c @@ -570,8 +570,8 @@ mach_port_destroy( kr = ipc_right_lookup_write(space, name, &entry); if (kr != KERN_SUCCESS) { - if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD) { - printf("task %p (space %p) destroying an invalid port %u for space %p, most probably a bug.\n", current_task(), current_space(), name, space); + if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD && space == current_space()) { + printf("task %p destroying an invalid port %u, most probably a bug.\n", current_task(), name); if (mach_port_deallocate_debug) SoftDebugger("mach_port_deallocate"); } @@ -614,8 +614,8 @@ mach_port_deallocate( kr = ipc_right_lookup_write(space, name, &entry); if (kr != KERN_SUCCESS) { - if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD) { - printf("task %p (space %p) deallocating an invalid port %u for space %p, most probably a bug.\n", current_task(), current_space(), name, space); + if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD && space == current_space()) { + printf("task %p deallocating an invalid port %u, most probably a bug.\n", current_task(), name); if (mach_port_deallocate_debug) SoftDebugger("mach_port_deallocate"); } -- cgit v1.2.3