From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5BFA01F463 for ; Sun, 5 Jan 2020 17:11:13 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=VTn UjIDbvPrr+O5mChmyIKIw9RXg+SiLKLKYE+y26aATxHXii+w0Fzodx+K+oc8Ie4j 8jiJf70Dy5WNhVaqhZB1HiZIwkODqG8fM2Fj28TcKcZcd9F/Fa50gCOvLCmRngv3 LdQb3A2CZiGoz1oWaV26MuTDjKq/jPDyaYQHyvhI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=3Ta6sFdl8 llXBupiAw7O/9Rf+UM=; b=IuVikuKlEiTDcdwBXw2TsI2jmoczUnNQKxpir05bT +MMFuo8DzRrkfWpmwMQTG+ndVm51hym5Jul4Mn1GJUhXVcoJ4u6QiOLefGIUwA9L Qjwl9NQQfsAxtfx9XdpEa1vPMGV1CjaXCsZpPnIt98uvgCMoL/zNWezU3jlCDYIf 0s= Received: (qmail 107135 invoked by alias); 5 Jan 2020 17:11:11 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 107127 invoked by uid 89); 5 Jan 2020 17:11:10 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd,commited] hurd: Fix message reception for timer_thread Date: Sun, 5 Jan 2020 18:11:02 +0100 Message-Id: <20200105171102.1478774-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Without a proper size, we get MACH_RCV_TOO_LARGE instead of MACH_MSG_SUCCESS. * sysdeps/mach/hurd/setitimer.c (timer_thread): Add return_code_type field to received message, and set the receive size in __mach_msg call. --- sysdeps/mach/hurd/setitimer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c index 4a6fd1fe33..b16f4ddd5d 100644 --- a/sysdeps/mach/hurd/setitimer.c +++ b/sysdeps/mach/hurd/setitimer.c @@ -80,6 +80,7 @@ timer_thread (void) struct { mach_msg_header_t header; + mach_msg_type_t return_code_type; error_t return_code; } msg; @@ -89,7 +90,7 @@ timer_thread (void) _hurd_itimerval. */ err = __mach_msg (&msg.header, MACH_RCV_MSG|MACH_RCV_TIMEOUT|MACH_RCV_INTERRUPT, - 0, 0, _hurd_itimer_port, + 0, sizeof(msg), _hurd_itimer_port, _hurd_itimerval.it_value.tv_sec * 1000 + _hurd_itimerval.it_value.tv_usec / 1000, MACH_PORT_NULL); -- 2.24.1