From nobody Fri Aug 7 01:48:06 2026 X-Original-To: dev-commits-src-branches@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 4hGRqq0sHZz6nf42 for ; Fri, 07 Aug 2026 01:48: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hGRqp5G79z3p5Y for ; Fri, 07 Aug 2026 01:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786067286; 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=wfkaBPvCCCUv49+yoVqJ0vE2VwF1WZs33N0PKJ4/qFg=; b=Rnt/ISR2OcONnhHna7zgX5FINEAszmUikisVjYwPJDLoQ07p5/Aq/e8/hFZkdrNEYopZl/ 9JcMhHtAgF5cl8OZCNWzsuUkPmhelP6LNgup/LH5EHlJZ8uSeIuaH8Ws2Fu6tHkyRGdxxK 9MYYqfVUv1//Ps49jcyEjvFM8p+vph0lb0YYETiRiddWGSabSe9zt/UHmjOZvxsE9C3SN6 Ab6+ZqCe8g8fHIxghHeHjHtw0smj1Gf5ztAptH9INQVUL6+awzwTPf07hp0GKeDAsdS3kg 3pNllyZC4mLCkO7YMyt53tbhtzFwL+2zSViZW+RaRWB600PRSEabTj0NXyb6dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786067286; a=rsa-sha256; cv=none; b=ZUeTqBhYRNy9X7emGGjhsuu6jP7nO5A8MbvEoHUrtTqW7fKQazVUWySB7EIqxW28nUpe+m /e1r8kY6zZNGpeTwNChioJG6TQmo5jHxy2rgyOAGzp72OAYxWQgOjwF2fjJjQgYnqXEoD8 rNm9gdrNnMLNgx6ZTNIhenJfWCRTlhNBJD9GEQS3aEhJz9t80YRUiNkViGpWAfuhIVHl6/ 9forskEV8bjhsmm6JDpizmmfpqr3iwficX87mbu6h+FA4xO8rJaFSHI+wADufYL49D4irG nNr6tCJC+v+zKiHgz/kXvZGgecQcOgpfbM4mM0tJ2kOJUFHoFdIznFc5hgOn1w== 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=1786067286; 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=wfkaBPvCCCUv49+yoVqJ0vE2VwF1WZs33N0PKJ4/qFg=; b=gLXeK1z+9Zes38seEBPD1cgECrrGVztO9VB7Vo5qfhYVTR7cU4i1CZmeUPmKIUZ5gFD9PJ TO5h0wdbKcXWzF6EYXEFs0ctgH6KIvrUWSu86A8a6TnWYiyAe90xbr09v/0wfk7oIx7NVy v2RFiCyPjK3nWvVJ+hS54FtjGmtysyvRjpDxQCpJbQvMC22qMlRNdxjpWH8HUWWCyJ/aAB NfuZRmNEehaP5wsXeJA457IAgSMEZYxFTeVZkJH+U1jYZbFHKayuldxSsSQ4PcERMJfwcy L7i2ZzRF/Ni8hgJwMNK5RL11GWMsy5Ie7DDD5/ap5BptSeJVbS6engu7ufFgbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hGRqp3nZ8zmqs for ; Fri, 07 Aug 2026 01:48:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c22f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 07 Aug 2026 01:48:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 2b25a0ebb48d - stable/15 - socket: remove tautological condition in so_unsplice() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2b25a0ebb48dc2340e1e15d1a05b89d7df036b38 Auto-Submitted: auto-generated Date: Fri, 07 Aug 2026 01:48:06 +0000 Message-Id: <6a753956.3c22f.7cd6a043@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=2b25a0ebb48dc2340e1e15d1a05b89d7df036b38 commit 2b25a0ebb48dc2340e1e15d1a05b89d7df036b38 Author: Kyle Evans AuthorDate: 2026-06-19 04:03:30 +0000 Commit: Kyle Evans CommitDate: 2026-08-06 23:34:46 +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 (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 d2ad4e147da5..11d7e794da00 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1773,7 +1773,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 @@ -1818,7 +1818,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); @@ -1864,8 +1863,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);