From nobody Thu Jun 25 00:50:53 2026 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 4gm0bf1g4Tz6k590 for ; Thu, 25 Jun 2026 00:50:54 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gm0bd5gBPz3Zr8 for ; Thu, 25 Jun 2026 00:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782348653; 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=SLGODxjM/TsDTyi9Zp/QQQnR1MrKak1ZXvOK7d1dEj8=; b=pQZPu6FSHFA9jkTwz4Prgxc96ExsLTxh9YG68Eez4Ev9Ha/m78phrZxzpd3Bm/9Dbvb3mu lB9KS63crnwDUFlEftin1+ormuzUgZJOQ1PlkaALDYUFZvuaGm4s0uzoG9ld2BiQAz1/yd 3/NF4vITnPEOtWCD1MYEH7dN20xFpQCqH0zvnsgbPERLSTqZJrrZFU5ocHZaxFYHOxhL46 l5pUo430QpxZZZqW6QvL8ObGtp6+2LGzLRqfmZPDEQq6cfK2qqNwEwLfrYefQk8NxIVNhN PkdoJsrvlgRoEAd5iJzGigEfI329Irp1/XskGX4hLYmO23XT6QekQDiUtGauag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782348653; a=rsa-sha256; cv=none; b=K2BgV/TAw6OV+EdzaRpWlIMF9hygwHYdgwmhegVhmXp46DmVxG0fz53fI+na6yj14msYqZ BKC3d/5RqyzgFXlDNC8okmtzrWwQIVBri+m4JruPCT0ChVmIlDzsel9WWIs5OrRRxKES4g 4q2gO22AUssKvNZftMVaPoEbMmgvIbestA1wWpaHVbabhYdqkOBQmznFGXjmvpUhFQz4hN ZB+s3Jpe/o/CfM25t77L1fjaH+2nIcFAsahVZsOXO6czoz6Q7T2KR2SsiFcQcBigtjMHx3 z7i445PlGFsOPgqSyf0UcrhnyvqMovo12H6zQ4Vrms3QuyVwbRRvPBxn+cAI3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782348653; 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=SLGODxjM/TsDTyi9Zp/QQQnR1MrKak1ZXvOK7d1dEj8=; b=C9Gz/BkSG/YUpEJlTXPt3y14IQDmkSoU/s2QzjjvS74Mk0iKwxyL8AYpUK6gTFX2Cn5lE3 oOTse8tZsF6jEqYVbNpl7C9H7/t+2CIZrSAvYzsph1hEzpfaqHPdmJ1nG7m8USr1SBJXaw XJ8e4OGY8QcRbQBr37f4cvXNA5f7KDkXtXQOieC0Xp6DiBV/mbClKvo0XK446b7Mwru7me 9Tvl+UgOAhd2sb9tBFJPsVZRvPgjSDCuaOat7jSdzUv/tihGv6SUs4ReylMwHYl8K0VG75 NPiF9XfSV74/3SpwDr5gXI/c5INX3OwL93878QWiAABLgzVL75tDBVqLJCLgDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gm0bd4V5XzkRf for ; Thu, 25 Jun 2026 00:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cc43 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 25 Jun 2026 00:50:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b94b53178039 - stable/15 - efirt(9): carefully destroy efi_lock 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: b94b53178039c86da9acb597a9191d5e5db0f636 Auto-Submitted: auto-generated Date: Thu, 25 Jun 2026 00:50:53 +0000 Message-Id: <6a3c7b6d.3cc43.439d8967@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b94b53178039c86da9acb597a9191d5e5db0f636 commit b94b53178039c86da9acb597a9191d5e5db0f636 Author: Konstantin Belousov AuthorDate: 2026-06-20 12:20:38 +0000 Commit: Konstantin Belousov CommitDate: 2026-06-25 00:50:22 +0000 efirt(9): carefully destroy efi_lock (cherry picked from commit 8edcb37dd0753dc7e50044d9ccf0e991392a3d84) --- sys/dev/efidev/efirt.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index d6a572720c37..52ccb5ca548b 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "opt_acpi.h" #include @@ -184,7 +183,6 @@ efi_init(void) TUNABLE_INT_FETCH("efi.rt.disabled", &rt_disabled); if (rt_disabled == 1) return (0); - mtx_init(&efi_lock, "efi", NULL, MTX_DEF); if (efi_systbl_phys == 0) { if (bootverbose) @@ -285,8 +283,6 @@ efi_uninit(void) efi_systbl = NULL; efi_cfgtbl = NULL; efi_runtime = NULL; - - mtx_destroy(&efi_lock); } static int @@ -858,13 +854,19 @@ const struct efi_ops *active_efi_ops = &efi_ops; static int efirt_modevents(module_t m, int event, void *arg __unused) { + int error; switch (event) { case MOD_LOAD: - return (efi_init()); + mtx_init(&efi_lock, "efi", NULL, MTX_DEF); + error = efi_init(); + if (error != 0) + mtx_destroy(&efi_lock); + return (error); case MOD_UNLOAD: efi_uninit(); + mtx_destroy(&efi_lock); return (0); case MOD_SHUTDOWN: