From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by sourceware.org (Postfix) with ESMTPS id 8CD1E385BF83 for ; Mon, 6 Apr 2020 19:00:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8CD1E385BF83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=whitebox@nefkom.net Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48x0HH1mD6z1qsbJ; Mon, 6 Apr 2020 21:00:43 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48x0HH1Tskz1qqkZ; Mon, 6 Apr 2020 21:00:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id kW9Nel4pDl5w; Mon, 6 Apr 2020 21:00:42 +0200 (CEST) X-Auth-Info: wMUzLgBPoQF8ptnFlFTc5IJr1j4+rBOG+qO7FGNMOZgj577J4IiPZ1LGZGkrTpX/ Received: from igel.home (ppp-46-244-165-152.dynamic.mnet-online.de [46.244.165.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 6 Apr 2020 21:00:42 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id F34B32C024C; Mon, 6 Apr 2020 21:00:41 +0200 (CEST) From: Andreas Schwab To: Alistair Francis via Libc-alpha Cc: Alistair Francis Subject: Re: [PATCH] linux: wait4: Fix incorrect return value comparison References: <20200406183921.530591-1-alistair.francis@wdc.com> X-Yow: I'm DESPONDENT... I hope there's something DEEP-FRIED under this miniature DOMED STADIUM... Date: Mon, 06 Apr 2020 21:00:41 +0200 In-Reply-To: <20200406183921.530591-1-alistair.francis@wdc.com> (Alistair Francis via Libc-alpha's message of "Mon, 6 Apr 2020 11:39:21 -0700") Message-ID: <87blo4fnhi.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-16.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 19:00:46 -0000 On Apr 06 2020, Alistair Francis via Libc-alpha wrote: > Path 600f00b "linux: Use long time_t for wait4/getrusage" introduced > two bugs: > - The usage32 struct was set if the wait4 syscall had an error. > - For 32-bit systems the usage struct was set even if it was specified > as NULL. > > This patch fixes the two issues. > > Signed-off-by: Alistair Francis > --- > sysdeps/unix/sysv/linux/wait4.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/wait4.c b/sysdeps/unix/sysv/linux/wait4.c > index d14bd4da27..796691eb2b 100644 > --- a/sysdeps/unix/sysv/linux/wait4.c > +++ b/sysdeps/unix/sysv/linux/wait4.c > @@ -32,10 +32,7 @@ __wait4_time64 (pid_t pid, int *stat_loc, int options, struct __rusage64 *usage) > struct __rusage32 usage32; > pid_t ret = SYSCALL_CANCEL (wait4, pid, stat_loc, options, &usage32); You should pass NULL if usage is NULL. > @@ -119,10 +116,8 @@ __wait4 (pid_t pid, int *stat_loc, int options, struct rusage *usage) > > ret = __wait4_time64 (pid, stat_loc, options, &usage64); Likewise. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."