From nobody Thu Apr 20 04:15:28 2023 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 4Q24810zWZz46DJ5; Thu, 20 Apr 2023 04:15:29 +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 4Q24806kmgz40Qj; Thu, 20 Apr 2023 04:15:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681964128; 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=55dRbKsd4Bq2MHP8vd9DlxsIiW8sgITV96jK8bZMNBY=; b=YsygQ2+uz/albVnv8CkSMCnQ9Bw5owpxfHL0TtGJ8JR6mVvpBhfb0CXqTaBYPtIcN25n3B lSFwjtOUJ0Yn/myP2lHio717Xmlw/J9IqAIO6T+3fOm6pA2SemAC6F11YCrtieEHbRKcAn JNLLt8etgkS1yd+0ea+HTUIdFU7K3RkcgZzyuSLl0JHVmILrBM6kLF/RLlP335p/O/PKBT MJR1XJzbHEQbTBQI9b5k1ZoE9Mp3zUygzx4W/cRK1W8/013ae5+bZBHosWMqNOEYgukmet icExuM/HS1qdgcEPXWBGfgRj8+PyYYwQc4hk/esiIEyv2m/SU6qEL3shrPIBzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681964128; 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=55dRbKsd4Bq2MHP8vd9DlxsIiW8sgITV96jK8bZMNBY=; b=sMvo/YZwnghb8+W8CU32RHdDUbprW10VY+eVIMjUkcGs8kGcpvGryv150L8MIG5xlMZ437 2NXDoFakqHkjaYaxCyre3JwkpR0I2qc/E50KBG2L2CUrs2CrMy/0m3fQ/XgcehVBqyXxSg yAX+VW+0HU3aw4xEimtQvRNDXbczegTulLPr9vlYTQ+RGIJOi2H71leS3F2s4gd7wUOhud 8PajXNksEGtIFRu5eZg3bJQ3ejH2jizyuzkVht7WyvrDDYXl/bZ3bMmGO098WCjnjeuMNe FvpzVmn2567r0055g9rjnyL5i/oodHi/EJaB3MTTbzG4qR3o1vUom6C4zBuaJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681964128; a=rsa-sha256; cv=none; b=sYzpQ8kAXx+T4OGpaakNdkIMEurSpcR2cXfMKKGUokrNit1zVwWH/qMDExrNwQnq7K5B3J RfSTfavzKjw38CIVGbn6jlhAH3gQTodDtHKNdl+NNQTOxiKoUEDrb44X1WenFY4bE7RAnu T7WNSdL7j84SWEGToyy3x8E63/4ClCCS+fiJVJUDySl5R5YMvBIcMhsS2V8gmYxgV0IdJq NJ0lB8tX7FsaVJ8y6iJAtKJBBYFcLcbpImks+5hahHJUjDL18AYMB+81SOynC6S1HfR3LV RnUYgmciWjMzR21pGePZypjn9Pym+FBD3A/AXKeRttmQ2BDDTPo9FL/djnWVKQ== 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 4Q24805njQzMhg; Thu, 20 Apr 2023 04:15:28 +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 33K4FSGt060752; Thu, 20 Apr 2023 04:15:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33K4FSvg060751; Thu, 20 Apr 2023 04:15:28 GMT (envelope-from git) Date: Thu, 20 Apr 2023 04:15:28 GMT Message-Id: <202304200415.33K4FSvg060751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 7e5811f76bb0 - stable/13 - loader: lua: unload the kernel when changing BEs 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7e5811f76bb0df289b32144849331a2db83ac718 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7e5811f76bb0df289b32144849331a2db83ac718 commit 7e5811f76bb0df289b32144849331a2db83ac718 Author: Cyrus Rahman AuthorDate: 2023-04-16 02:27:53 +0000 Commit: Kyle Evans CommitDate: 2023-04-20 04:15:15 +0000 loader: lua: unload the kernel when changing BEs Usually the kernel is loaded later, but there are circumstances where it could have been loaded earlier than changing BEs. Unload anything that is already there so that we know we're using artifacts from the proper environment. PR: 265471 Reviewed by: kevans MFC after: 3 days (cherry picked from commit d7584aa09fcf8d96544e5bfb3ea78f50d7720c0c) --- stand/lua/menu.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 400dbf3d469b..4a326cb54bb9 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -58,6 +58,9 @@ local function bootenvSet(env) loader.setenv("vfs.root.mountfrom", env) loader.setenv("currdev", env .. ":") config.reload() + if loader.getenv("kernelname") ~= nil then + loader.perform("unload") + end end local function multiUserPrompt()