From nobody Fri Jun 17 19:38:51 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7C35085BA96; Fri, 17 Jun 2022 19:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LPq974bk1z3Qmj; Fri, 17 Jun 2022 19:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r1C/l70ezdXjzZf+fzvS8UhOGitVLtGOmW6/cxb/XCI=; b=b1QgZMgxiGkukDv7FsvwiegY9B8re/V1JEhVQEzWPlTkY2AAcXh26fGTSpsELvkK884yxT +gLtLqLEB8qzXNaqZAhfteaGj7Af/X6oADJ/fuHbmluT5wZfb2r3rI3DW0B1NM2MZEsILu W/MBdkWRXQlEPjwcfBhq5R+Q9EeZn7Q0ObJqbhWeVT8Mbd9KuxpAurlOx8mWADjnxlb0Ux Czz20Xn3UZ0t/B5JAfr6F/AjaKgLqKZpXxGkvk4maA56nRLN7GzEyzFqJp0L7kU9K2zaYK I+3qxPgc4Pzz8hCZ0QGUOzkgTdNTtaCf3cb+qjBSyzREGLemsldP87ELLZwONA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B9A425C4C; Fri, 17 Jun 2022 19:38:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25HJcpDW015229; Fri, 17 Jun 2022 19:38:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJcpvJ015228; Fri, 17 Jun 2022 19:38:51 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:38:51 GMT Message-Id: <202206171938.25HJcpvJ015228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: ccbef519e0c6 - stable/13 - linux(4): wait4() returns ESRCH if pid is INT_MIN. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ccbef519e0c69cc19af2e56bd7ce307ca6daefee Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r1C/l70ezdXjzZf+fzvS8UhOGitVLtGOmW6/cxb/XCI=; b=YzME3gc+vjjmHCvE/BxnJ/eb21L5qLtMFWKzeBlZgFNeIhy/ixa64KzKzKbvUOsp2jE3pL 63gW1PLMg5cRuQ3lStAGUaEpOk4De89F9KyC8fbz1RNNcygi1D8zi72NUZ7WsfE22GEbF6 /bdPwy7Z25P99Y1BO1u+PrW3wbV/Lahqei1G2PMoAlKojyEp5OoLsKvNzCsNQltJRgtAFs ylD5M4QhIuTjsZTz21nx02aWHdJD/yJkQAR8UGlS2RoxPnIrtLfHiYF9RxyV74Jt4kw6LA 3iibxpIjgU4UtMGzFD2gjHgZlAgGn6gPgBF3FhW4G/BCDP9whsg41OxTq6uG+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494731; a=rsa-sha256; cv=none; b=ZCMnwT4ftprFLp/LeCRCt7cELxSkOOmgQljnaMdTHQP6Vdl7W5ATrCcgwZUhJKpcqQar/i 5PVRKrTZs47qJk7kcdsQOaIb39coCguWiF1chmTmMij9cLhfnK8lW3AZeUnDdA5Vg4e9De EGJBU/fqSMQ3PR1kHTvkRN5pH9dRp9pYF8Rp4bXvsu66CsPZiZNPOainn6eXV+D52xfyOz Z2ng9pdttxdnQuAR1QbaYJfJmQTLg7htdR3GHv+GLSJWNJ0Zf0OZZ9FvfEa6tz3vURsWcA YicdmtsYx4DFvPFuQRCxDiIv7+oLo3eKK/MkBya8z9fceIexQxlT1E8LhIASQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=ccbef519e0c69cc19af2e56bd7ce307ca6daefee commit ccbef519e0c69cc19af2e56bd7ce307ca6daefee Author: Dmitry Chagin AuthorDate: 2022-03-31 17:49:39 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:33:46 +0000 linux(4): wait4() returns ESRCH if pid is INT_MIN. Weird and undocumented patch was added to the Linux kernel in 2017, fixes wait403 LTP test. MFC after: 2 weeks (cherry picked from commit 9103c5582a2d271fa8f4df136ae511da572c660f) --- sys/compat/linux/linux_misc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index ea7dafec0849..fa7d364681dc 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1054,6 +1054,10 @@ linux_wait4(struct thread *td, struct linux_wait4_args *args) LINUX_WCONTINUED | __WCLONE | __WNOTHREAD | __WALL)) return (EINVAL); + /* -INT_MIN is not defined. */ + if (args->pid == INT_MIN) + return (ESRCH); + options = 0; linux_to_bsd_waitopts(args->options, &options);