From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 2DAE63856DCD for ; Mon, 17 Apr 2023 23:24:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2DAE63856DCD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1poYCv-0007cV-Ps; Mon, 17 Apr 2023 19:24:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=nvCz39ZChlfN1iwOVRc720vTvToMtd/uCvPcBXb4cfY=; b=SD2acDBD0y4o+Yub872e da+VNt+SzOcw5J6dK+hmhfQzRyCHJEskyWt1mgnU3fEe7F2LpLs5craoqhw3AXgaGJ6A/jVv6bn0Y b/XQx3JSiAt+AERrfc1pfMdtK+XZQ5b1Ey22AuljFVMRSz37iWbYpHrQt4lgoQMgerU+YOZKa/FyQ 2rmKTHr2Wh14DvGGBsWNM8ARmRxb9fwN6Jge2rPS3bsm6XvpZdIWAbQQkW4zJz2cWHD3+P1U1qL9F 4vX8HjX1Es2yFpuEh5fedTz1QbDyq2H13kHDw7mKrAu0YMuZwjWnYscV5fnf9L+7Uh/w5A7olRYqX Sfv54BFTO9uDOA==; Received: from 2a01cb008c251f00de41a9fffe47ec49.ipv6.abo.wanadoo.fr ([2a01:cb00:8c25:1f00:de41:a9ff:fe47:ec49] helo=begin.home) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1poYCv-000623-Jl; Mon, 17 Apr 2023 19:24:25 -0400 Received: from samy by begin.home with local (Exim 4.96) (envelope-from ) id 1poYCt-00AhFp-1J; Tue, 18 Apr 2023 01:24:23 +0200 Date: Tue, 18 Apr 2023 01:24:23 +0200 From: Samuel Thibault To: Sergey Bugaev Cc: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: Re: [PATCH 5/5] hurd: Avoid leaking task & thread ports Message-ID: <20230417232423.marouoe65dd3pssd@begin> Mail-Followup-To: Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd@gnu.org References: <20230414193700.542116-1-bugaevc@gmail.com> <20230414193700.542116-5-bugaevc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230414193700.542116-5-bugaevc@gmail.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Applied, thanks! Sergey Bugaev, le ven. 14 avril 2023 22:37:00 +0300, a ecrit: > Signed-off-by: Sergey Bugaev > --- > hurd/catch-exc.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/hurd/catch-exc.c b/hurd/catch-exc.c > index d375bf67..bec850f9 100644 > --- a/hurd/catch-exc.c > +++ b/hurd/catch-exc.c > @@ -35,6 +35,7 @@ _S_catch_exception_raise (mach_port_t port, > #endif > ) > { > + error_t err; > struct hurd_sigstate *ss; > int signo; > struct hurd_signal_detail d; > @@ -83,6 +84,11 @@ _S_catch_exception_raise (mach_port_t port, > MACH_PORT_NULL, MACH_MSG_TYPE_PORT_SEND, > 0); > > + err = __mach_port_deallocate (__mach_task_self (), task); > + assert_perror (err); > + err = __mach_port_deallocate (__mach_task_self (), thread); > + assert_perror (err); > + > return KERN_SUCCESS; > } > > -- > 2.39.2 > -- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.