From nobody Tue Nov 17 17:02: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 4jTWJG34ddz71Qd1 for ; Tue, 17 Nov 2026 17:02: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jTWJF6xvxz4C8n for ; Tue, 17 Nov 2026 17:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794934974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rEumITSDNxHsgjHI0QeC6yc7k9Fl3wjskjc75WgypS8=; b=m4j9glDvN56VKtBRryvBR4C1k7rWZBOJ40ZPLIAvzmfp3Ug+N0efcUBk747x+2MmWeD1/K 5b9J5fiAYeLdXpFge/dFCNwjmgCC7dicQLSsk+LQIYmflL4GonpXK5uCGaUWXOAJRzqd2+ m2O5VuVNvbMKYuZ6lq4hez+XCCMNashCIBW6CGoMCGLs79sAVGXbSusQz6gjaGJJ3XgJeP X/Mr3Uk4cPpbIkkN4ONYm8ZqBee0AR/NRjtJzK/L1LxtlHDlRpFj/exXKS0YHsFu/fSPSi 93rzl4KmlV6l21sE1wrFFfixY2JeWIWKWSrGWrX88b5E+kOjN+OX2G4UUlej+g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794934974; b=bhIyykmEvld9NRJ5c3oxg3ECY/5Dx0TIOwPHTUiUIjp8p89y6Deg/eixTuHhqbdjWvmFG+ ZKr9EUWslHy6sqFwiOMEuNMmH5DCCk8Jl1mv4wNp11wfQH6xy8w7Ydmv/Q8W8uQ81MGSbx TR2twg1ym5++Xt3XN03EaDaNJz6tViUAuhqym2Uxi8ZsSYq6XsnHC2lQMXS/GiytlJp2Fh w/oSmCuKTIihiymsgHG2XEffjvhovIXqspFgePMbEWYI69kXu1+L+Ft+682SReZZmnIWHs JFkDY9BS405MZ8QB7k1hJQq0XsXyCS5PZQnFrm87PmGEjYGEe8BwnqjGpPl5JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794934974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rEumITSDNxHsgjHI0QeC6yc7k9Fl3wjskjc75WgypS8=; b=dxt4+YZLotVjV5/q74NSoc84rd7gbZhxbUwYA9ggttyNB0TPfaoR4HzKISst/0Q2gvb8eF uXzS7xOR7ZmZ2Ntft1zIlFVsZgDm1SmK1SNQ/9hzVMYx2dcMc/xyisE4BgauU+L/8F9G8U VPu0Xj3uUjvFq2QOzO4GwlbCgVQYrziC/r+/NxGft1QdNYy+8otjiCT1PXZvUgoSmenGA7 uXL2TviPMsTr7VYdHQwYHSoMxHppIIlPc8iK9cm+hrVYbCVXEBiShvV/HUdD8M5L/rGdEc fMO0SSxPD1enrNFnEJL8qmVo9dPVNlEfb+VTcVCbcJYl8wPEr2tKtHO64zj2nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jTWJF5yTGzr8R for ; Tue, 17 Nov 2026 17:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e7e6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 17 Nov 2026 17:02:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kyle Evans From: Mark Johnston Subject: git: 91bc04192338 - stable/14 - socket: remove tautological condition in so_unsplice() List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 91bc04192338c30b2a2f70f1b108e9ee20d0169e Auto-Submitted: auto-generated Date: Tue, 17 Nov 2026 17:02:53 +0000 Message-Id: <6afc88bd.1e7e6.2f9ad518@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=91bc04192338c30b2a2f70f1b108e9ee20d0169e commit 91bc04192338c30b2a2f70f1b108e9ee20d0169e Author: Kyle Evans AuthorDate: 2026-06-19 04:03:30 +0000 Commit: Mark Johnston CommitDate: 2026-11-17 13:24:11 +0000 socket: remove tautological condition in so_unsplice() so2rele was introduced in 1000cc4a0d3 and it was necessary there, but the cleanup in a837d1fe49e0255 rendered it redundant if our own KASSERT is to be believed: we've asserted that `so2->so_splice_back == sp` and `sp` has been dereferenced above, so there's no condition left where we shouldn't release the socket reference at the end. Indeed, the change in so_splice() to NULL out sp->dst removes that possible state of a partially constructed splice: if sp->dst is set, it has been ref'd. Reviewed by: gallatin, markj Differential Revision: https://reviews.freebsd.org/D57558 (cherry picked from commit 8a3d28375450946e4b0de239c9239df54c22d298) --- sys/kern/uipc_socket.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 7811e33ad46c..f181872cebcb 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1752,7 +1752,7 @@ so_unsplice(struct socket *so, bool timeout) { struct socket *so2; struct so_splice *sp; - bool drain, so2rele; + bool drain; /* * First unset SB_SPLICED and hide the splice structure so that @@ -1797,7 +1797,6 @@ so_unsplice(struct socket *so, bool timeout) KASSERT(so2->so_splice_back == sp, ("%s: so_splice_back != sp", __func__)); so2->so_snd.sb_flags &= ~SB_SPLICED; - so2rele = so2->so_splice_back != NULL; so2->so_splice_back = NULL; SOCK_SENDBUF_UNLOCK(so2); SOCK_UNLOCK(so2); @@ -1843,8 +1842,7 @@ so_unsplice(struct socket *so, bool timeout) sorele(so); if (so2 != NULL) { sowwakeup(so2); - if (so2rele) - sorele(so2); + sorele(so2); } CURVNET_RESTORE(); so_splice_free(sp);