From owner-dev-commits-src-branches@freebsd.org  Tue Mar  2 18:43:48 2021
Return-Path: <owner-dev-commits-src-branches@freebsd.org>
Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A89154C131;
 Tue,  2 Mar 2021 18:43:48 +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 4DqmHP3qrwz4tPx;
 Tue,  2 Mar 2021 18:43:45 +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 273E01BA78;
 Tue,  2 Mar 2021 18:43:45 +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 122Ihikn018780;
 Tue, 2 Mar 2021 18:43:44 GMT (envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
 by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122Ihit4018779;
 Tue, 2 Mar 2021 18:43:44 GMT (envelope-from git)
Date: Tue, 2 Mar 2021 18:43:44 GMT
Message-Id: <202103021843.122Ihit4018779@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
 dev-commits-src-branches@FreeBSD.org
From: Edward Tomasz Napierala <trasz@FreeBSD.org>
Subject: git: 5dc2e1bcf41f - stable/13 - Don't check compat.linux.emul_path
 before loading linux(4)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: trasz
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: 5dc2e1bcf41f853b31b6d08a5c2d643408e890f3
Auto-Submitted: auto-generated
X-BeenThere: dev-commits-src-branches@freebsd.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: Commits to the stable branches of the FreeBSD src repository
 <dev-commits-src-branches.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-branches>, 
 <mailto:dev-commits-src-branches-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-branches/>
List-Post: <mailto:dev-commits-src-branches@freebsd.org>
List-Help: <mailto:dev-commits-src-branches-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-branches>, 
 <mailto:dev-commits-src-branches-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Mar 2021 18:43:48 -0000

The branch stable/13 has been updated by trasz:

URL: https://cgit.FreeBSD.org/src/commit/?id=5dc2e1bcf41f853b31b6d08a5c2d643408e890f3

commit 5dc2e1bcf41f853b31b6d08a5c2d643408e890f3
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-02-08 21:52:31 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2021-03-02 18:43:26 +0000

    Don't check compat.linux.emul_path before loading linux(4)
    
    Fix e40787f900f to make libexec/rc/rc.d/linux retrieve the sysctl
    after loading the kernel module which provides it, not before.
    
    Reported By:    jkim
    Sponsored By:   The FreeBSD Foundation
    
    (cherry picked from commit 07cac176fba947381c8111b8e02e8067e7fa542a)
---
 libexec/rc/rc.d/linux | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libexec/rc/rc.d/linux b/libexec/rc/rc.d/linux
index 4381b62cc660..f44a9d02fc8d 100755
--- a/libexec/rc/rc.d/linux
+++ b/libexec/rc/rc.d/linux
@@ -18,7 +18,6 @@ stop_cmd=":"
 linux_start()
 {
 	local _emul_path _tmpdir
-	_emul_path="$(sysctl -n compat.linux.emul_path)"
 
 	load_kld -e 'linux(aout|elf)' linux
 	case `sysctl -n hw.machine_arch` in
@@ -26,6 +25,9 @@ linux_start()
 		load_kld -e 'linux64elf' linux64
 		;;
 	esac
+
+	_emul_path="$(sysctl -n compat.linux.emul_path)"
+
 	if [ -x ${_emul_path}/sbin/ldconfigDisabled ]; then
 		_tmpdir=`mktemp -d -t linux-ldconfig`
 		${_emul_path}/sbin/ldconfig -C ${_tmpdir}/ld.so.cache