From nobody Sun Oct 5 15:54:06 2025 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 4cfn5C0VYkz6BCb2; Sun, 05 Oct 2025 15:54:07 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfn5B62jTz3Frw; Sun, 05 Oct 2025 15:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759679646; 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=bZWTZtXjsuzjWXaizQuJuKO0bCLqDi05Njh9lbyk5+Q=; b=V0aNHV6gMD9ChtGfyLvAbqxlneX52tH+fK/S0J0jg5fgEPnszHpu6iG8nUvGB8tb7u8Emt bjrq3BrFjf+HBVUWfrtaa26T+5mVfE9WsDmyzrxO1DPFPilIImD2wwoXaLvHxHyFk7Ahvg RMvJMJAQRZoiungh1qO2qKl43NX4mvk5J6Bsjo5pbPCxdlwUYrA5GC/4YTobefdgsGXb80 vqZsqCihT9/3oLksUEZGUp+06XXZ4qU+AopzUjkypDB2aPzXeUI6PpnSyfIovn9ku3st+z hgl8QXd+NHpTBdq9aFKYYFm1Kv47FsjGV/NBXGNPgVmLsWlFXyucYwyrt0FZPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759679646; 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=bZWTZtXjsuzjWXaizQuJuKO0bCLqDi05Njh9lbyk5+Q=; b=hLubWn6bsdqXvPiPL62TPW9GxHkWDJ/kVpGSa1up+6VXC9lmWRf4xbjnD9RIbrNpW6kvG5 BnvazfufRlw1zyHVVBYyBdGgNmqUsZz6AYguUrSvH8kLt0MhtPUzJu4wa1w+9kfU9mCPyg iiOZ4TolDLexoQfrsk2AWt4f2AC5NPrK/GvhYnASS2LLo4TXuYATnGel3RsEQ0efl2jTiY poJ5oV7Bebf5roETUsoB7N5iV/dmzjCAODybPUsiUOxtWyIsvfGloy1REKHVhdQkzxu3YM yAQ3LRdCM00Zf/R/88OU2Z8VEmXk2N33cvSXyfMZqjHzhUHP1QREJZZmayvX9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759679646; a=rsa-sha256; cv=none; b=EBY1TxEzp3f7KA2HjJlpP73u2r71CqQVD6cmE4cnz3cLuapPCLCmmB0S7krHU2VDVN6NGX yQ3P43QYIq3TmQ+C96Z2vI0ZA8M3LykZznV1nPDQZsQh6IRmxYVWd8nvAnEP4PQTQqHCXe AmtMAC2ecg/2hMEulkkWYa0Dk2z+re0Pk5+0lfEpflmbTKB4EnsAzRL0cp8dvbxrVPrJaE 3K/8xy3zQ9SQlnZcpK5BUYa3iem5laytTQHjAk2qV82lpj9yqlPY/sC5PzQw4O2CgUgi+B Zd00iOxoeI6VVNE9pZ89O7w6OAPMjkD5s08bUfBla3wuXfukQdiXdQuYM8azrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cfn5B5H2Bz3Yq; Sun, 05 Oct 2025 15:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 595Fs6Px076731; Sun, 5 Oct 2025 15:54:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 595Fs6S5076728; Sun, 5 Oct 2025 15:54:06 GMT (envelope-from git) Date: Sun, 5 Oct 2025 15:54:06 GMT Message-Id: <202510051554.595Fs6S5076728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: d0a35ec01c31 - main - pipe: consistently use PIPE_LOCK_ASSERT 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0a35ec01c31b498bd9996b50641a8629757b65f Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d0a35ec01c31b498bd9996b50641a8629757b65f commit d0a35ec01c31b498bd9996b50641a8629757b65f Author: Mateusz Guzik AuthorDate: 2025-10-05 15:37:41 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-05 15:37:41 +0000 pipe: consistently use PIPE_LOCK_ASSERT --- sys/kern/sys_pipe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 30527fdd4fd0..57ebe8dc85f0 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -567,7 +567,7 @@ pipespace_new(struct pipe *cpipe, int size) static int curfail = 0; static struct timeval lastfail; - KASSERT(!mtx_owned(PIPE_MTX(cpipe)), ("pipespace: pipe mutex locked")); + PIPE_LOCK_ASSERT(cpipe, MA_NOTOWNED); KASSERT(!(cpipe->pipe_state & PIPE_DIRECTW), ("pipespace: resize of direct writes not allowed")); retry: @@ -1679,8 +1679,7 @@ static void pipe_free_kmem(struct pipe *cpipe) { - KASSERT(!mtx_owned(PIPE_MTX(cpipe)), - ("pipe_free_kmem: pipe mutex locked")); + PIPE_LOCK_ASSERT(cpipe, MA_NOTOWNED); if (cpipe->pipe_buffer.buffer != NULL) { atomic_subtract_long(&amountpipekva, cpipe->pipe_buffer.size);