[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH gnumach] Use MACH_PORT_NAME_NULL and MACH_PORT_NAME_DEAD when
From: |
Samuel Thibault |
Subject: |
Re: [PATCH gnumach] Use MACH_PORT_NAME_NULL and MACH_PORT_NAME_DEAD when checking for null or dead rights |
Date: |
Wed, 29 Nov 2023 10:14:16 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Applied, thanks!
Flavio Cruz, le mer. 29 nov. 2023 00:28:38 -0500, a ecrit:
> Comparing mach_port_name_t that is MACH_PORT_NAME_DEAD against
> MACH_PORT_DEAD will always return false.
> ---
> ipc/ipc_space.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ipc/ipc_space.h b/ipc/ipc_space.h
> index 9b199de..3f0eaa0 100644
> --- a/ipc/ipc_space.h
> +++ b/ipc/ipc_space.h
> @@ -161,7 +161,7 @@ extern volatile boolean_t mach_port_deallocate_debug;
> static inline void
> ipc_entry_lookup_failed(mach_msg_header_t *msg, mach_port_name_t name)
> {
> - if (name == MACH_PORT_NULL || name == MACH_PORT_DEAD)
> + if (name == MACH_PORT_NAME_NULL || name == MACH_PORT_NAME_DEAD)
> return;
> printf("task %.*s looked up a bogus port %lu for %d, most probably a
> bug.\n", (int) sizeof current_task()->name, current_task()->name, (unsigned
> long) name, msg->msgh_id);
> if (mach_port_deallocate_debug)
> --
> 2.39.2
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.