From nobody Sun Feb 22 19:27:06 2026 X-Original-To: dev-commits-src-main@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 4fJvBL3v6Dz6TdNj for ; Sun, 22 Feb 2026 19:27:06 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fJvBL38cjz3DRh for ; Sun, 22 Feb 2026 19:27:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771788426; 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=3xNQL5ULDe0mUGvCr0TWVqw56uHjc7CdhBES5gYeeTU=; b=CeGwccMm6joSjxHYP6gBMbuS1kiONFgb6BJ8xvJZ25P9QYJTifOFl7JgHwnAwxNv9410Sg pHMTFMJ5JEDsjF2idkJduWfugWHE5FusyzBQT5z162T4ua5e3HdOIENnRdjwQI9DPZGlhd AiMVbPZnU+aGnsYSAxm1/bucZsQQPKFvsjbi4cHL0uFJ0fcH2NGWO2gAR59V0ClrbyNlp8 tb3WTxMZ11mQcTE+cBIjX8kxU5y83U5K5ag88lNO0xb+AUv8haQ/kBh54jZ9oXzE3TfxmR TA4e8WOuGo7njh4ZlbTcN4k0LPgbKlu0+26Lu/+kAHLkhKqaJ/PUwi8WYTBx6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771788426; a=rsa-sha256; cv=none; b=UDSrFiaDLIIhV0FnGkI7Lhee2DTelbpfSjJyzWJMJVF4j8bLn9i9d0M1cN9OMMFY4hB8gY fN1Dy7RSd5nAMRNnRtQcab//lT4DLteZlS02sVYWum+zf0XaVsziYtpK//N2Rdude7gEGT MvRVlPdiSx+oWXqH/0buT+FO36xC+6BIbJVfxmTMoG9X9gFtL8Wscn5eYusmIhehIsf2M2 KtXci/GSalWE8WzqCrfFxFV+DhBLXSlggfPrgZa+h/NOpjPRffFgeN2twQK6AhCfuqrDnc RTnAMcUHPG5F3II/4nQH1sefwMXjHfeZngI0cAeAWNqekx0TcdtNDOcC+JpnjA== 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=1771788426; 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=3xNQL5ULDe0mUGvCr0TWVqw56uHjc7CdhBES5gYeeTU=; b=r5HEEDm8yuRdBEkpXpIbm7go+jvG6OAV8m32sfssxvc3w/EQYBM2+nGm95//PIiNDbkmxW 0lTNx8HIK3bkJFANzeURulvH0+c3P1qSuoe9AazzMSjc+shydvZIWU7NM88smVTyHyeDL7 Us8XLITZQD3UWKQWyxu3LVoSircn+4Ycr2J8X+Lw27A7APULinOto4SCc3EDRPHYqUH/0B dBBD7OoiR3KAwNWCHYfJZxG6mxswbuAKBZk1r/ZhXYur3uWgI4WpGCUaolKfYl21cw+dOE ZJSJtlbRqGUG3/4/kddILbMg6WIm6BuKeTJjfzvZ0C9stqAtyiM0myXJHJj3AA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fJvBL1pnSzxSh for ; Sun, 22 Feb 2026 19:27:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4376d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 22 Feb 2026 19:27:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: eaeb356ce349 - main - buf: Relax an assertion in BUF_UNLOCK List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eaeb356ce3491f05b6a99ccd485180a42df22c46 Auto-Submitted: auto-generated Date: Sun, 22 Feb 2026 19:27:06 +0000 Message-Id: <699b588a.4376d.7292a010@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eaeb356ce3491f05b6a99ccd485180a42df22c46 commit eaeb356ce3491f05b6a99ccd485180a42df22c46 Author: Mark Johnston AuthorDate: 2026-02-22 19:26:17 +0000 Commit: Mark Johnston CommitDate: 2026-02-22 19:26:17 +0000 buf: Relax an assertion in BUF_UNLOCK The BUF_UNLOCK macro asserts that B_REMFREE is not set, as it is up to the lock owner to complete the dequeue from the free list before releasing the lock. However, if the thread has acquired the lock multiple times, then releasing the recursive lock should be ok. Modify the assertion to reflect this. This was triggered by an out-of-tree filesystem. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55418 --- sys/sys/buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/buf.h b/sys/sys/buf.h index f08f05e6d50f..85ff5f3dfdc1 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -321,7 +321,7 @@ struct buf { * it has been handed off to biodone. */ #define BUF_UNLOCK(bp) do { \ - KASSERT(((bp)->b_flags & B_REMFREE) == 0, \ + KASSERT(((bp)->b_flags & B_REMFREE) == 0 || BUF_LOCKRECURSED(bp), \ ("BUF_UNLOCK %p while B_REMFREE is still set.", (bp))); \ \ BUF_UNLOCK_RAW((bp)); \