From nobody Mon Dec 06 00:28:06 2021 X-Original-To: dev-commits-src-branches@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 62DAE18BEC05; Mon, 6 Dec 2021 00:28:10 +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 4J6kmS4r6Xz4XVD; Mon, 6 Dec 2021 00:28:08 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 99201219CD; Mon, 6 Dec 2021 00:28:06 +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 1B60S6Dp084855; Mon, 6 Dec 2021 00:28:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B60S6Ol084854; Mon, 6 Dec 2021 00:28:06 GMT (envelope-from git) Date: Mon, 6 Dec 2021 00:28:06 GMT Message-Id: <202112060028.1B60S6Ol084854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2cb7a2282312 - stable/13 - t_mlock.c: Remove null_errno, it is write-only List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2cb7a2282312253ee20497b4da197e8f072a4bc7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638750489; 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=p8QQq01b9Kq56JMm2jHnICks5T23lLd+LfEninOd5TA=; b=estMQnEgWzwureKMH9sutnY++a8uaywh2C6YAJFhFtNfMvTK7bTJzibqVvGZWaPOAdZzLt o8jsc+6WnqhH8aIH2ukO73ZxY43YpWgaO+tf5WN8Y2MEdn7sOZXbLXL7M3KYrY0HyaIopF qQzb7oOtmZJMUa19QvnUXAYZW8DNQ2NNd1V/VGLjG6dXzdMEU/9WQSDVPBpEU3WDEgzJ3V dZE0n68dJtoL4RhJ5jLtivPQaQ5LxalltR23ZNatvbU2PwSuOI0X37eae80saM+3jLtTlD g71cDzqaFUCmUax7Rm2Aqpkp2JZr/PaFOKpYH6vyeDJ3t78qLBNm0kZ56H1bHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638750489; a=rsa-sha256; cv=none; b=RCZ70Tg8oWfvtNOfncGWP5mUuUDml2B1wHG6KLY4tDT2yI51lVUUd9/OSxUG63J08WAuVH e1XJya6nzHUbYiaiG3pzts9dsBrOwVjNffWmpUFwoHMwhASMja2Pan5MUPtC9+L6Q+Ziev NAk0g09mjdoSENSbps8EYixybWD/z7Y8eTq26copIZv+V5gsN5FsRz/0wbt61KKRhVdj16 pdAJAYgB6v/PXw3JxNolFkRsONo6PKsNB1NnDWY4S4ZlnKmd/Oco2ehenFCZw8z4wJCeGF iTJCZIT7chpmWrlV3/9DMQKpN4JlMt9CHH2GkgF9gymV5xCJukh+3Snh1BYgpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2cb7a2282312253ee20497b4da197e8f072a4bc7 commit 2cb7a2282312253ee20497b4da197e8f072a4bc7 Author: Konstantin Belousov AuthorDate: 2021-11-28 03:28:29 +0000 Commit: Konstantin Belousov CommitDate: 2021-12-06 00:23:45 +0000 t_mlock.c: Remove null_errno, it is write-only (cherry picked from commit 631607ac2965e8c6dcc0f21effc9b36fcb530558) --- contrib/netbsd-tests/lib/libc/sys/t_mlock.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c index 61085f35cc21..d9ffbe366a04 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c @@ -106,14 +106,9 @@ ATF_TC_BODY(mlock_err, tc) #if !defined(__aarch64__) && !defined(__riscv) void *invalid_ptr; #endif - int null_errno = ENOMEM; /* error expected for NULL */ void *buf; #ifdef __FreeBSD__ -#ifdef VM_MIN_ADDRESS - if ((uintptr_t)VM_MIN_ADDRESS > 0) - null_errno = EINVAL; /* NULL is not inside user VM */ -#endif /* Set max_wired really really high to avoid EAGAIN */ set_vm_max_wired(INT_MAX); #else @@ -124,9 +119,6 @@ ATF_TC_BODY(mlock_err, tc) */ errno = 0; ATF_REQUIRE_ERRNO(ENOMEM, mlock(NULL, page) == -1); - - if (vmin > 0) - null_errno = EINVAL; /* NULL is not inside user VM */ #endif errno = 0;