From nobody Tue Nov 17 17:04:17 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 4jTWKs5gL6z71Qqv for ; Tue, 17 Nov 2026 17:04:17 +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 4jTWKs3Xwwz4FjC for ; Tue, 17 Nov 2026 17:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794935057; 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=UAmV2ORXfJhlEWz00oJS1YkWd8gEJ1IXDb/264xEtkI=; b=YZJguHVdfDSFspedgG2Ks3Bn7sPqIYoDvTT8knu1VuqkIsGcsK5Bqm3WFFtRCSE6Te2yI+ TM5f9TU3hJqoghsf9wB9gOzzpx6nFIzTKN3PXPUaneTRF68x4KPVZ+AAOnMZK09PL1wkZf 5514V4y3/PvpTUASCY0N6DvlYMGqIw4UcsMLgNKj8wXMMRkV6ZSHBfMGncSdDtecws/G8y zLG3DV2cNl/eDM7p9VZ+9iQjbN5S9G0rsq7hjqU1t2X2VrTGaGFd3LpmqqiW+wuub57xne KiTUsXNxRcq8Rnhlk9tCZZ/yQeBgsLRff2133VY3cSJ99vh9kQS/lp77FZ3+6A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794935057; b=fff7kjEKJ56mJU2X7bqVDY+aB6xiGjrfaYFyZRr4a7xXBPifRhGDXEXoPscFvtyCFRcwEb KemiHzn1kXgIvnGZ4OHW03I5ZCDZUpAmtM5qEkplkOJ8rO/SnpIuYA5mN4t5UOZSgtmOdo NTZpJePJUFU1JvTu5hXpjkBto6+k/Kr8vQYojj7dvvKgikNqJgT0NQKZrag3qpi+xbQlpc x+YYKSPo4TauzvS3Hngcltdj39QZVebiNNNsTaGoy4WAz3d4NUwANGLIUEK8O1cp/SqBhs mT9+kP5qjS+wArGe9XQxjo/uK+rOgdLm4SK4pDH+/JclM88H24GA2zvf7N+y/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794935057; 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=UAmV2ORXfJhlEWz00oJS1YkWd8gEJ1IXDb/264xEtkI=; b=Sb35c5Nah8kvexNScKemeskUsTEfkM6YRDMsqapihiJzEHZ1U9oDaxb7XIjaLuzKntk7nl jAOkWH9N4Jpj7ucC6bx1/yieAqdmdICXSK34j7tsgfiUiSGiInN6UdjQpnPL4cBHyHwqN0 rueZLd8lKeMfps1QU7GwuMkxFlzH1K0OpsvTzyBn2KOMEwWrRAnglCQu+lJprPMW1QG3Ym uW9PaCZSGymxfZ/5Y8tUXJscmk5LbL1GSgkQIKyhWlo/gfsNB6FWza7M3f6BYauqBiYoka yNVOolnqko35H98WKF+ybzBT2cFn4QpeNBEx2O/9em0zGbe7Z3/k9f/17c4Vdw== 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 4jTWKs2xBMzrgZ for ; Tue, 17 Nov 2026 17:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f7ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 17 Nov 2026 17:04:17 +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: acea8d0466f3 - releng/14.4 - 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/releng/14.4 X-Git-Reftype: branch X-Git-Commit: acea8d0466f3c413ac42bc2776f3677383c82727 Auto-Submitted: auto-generated Date: Tue, 17 Nov 2026 17:04:17 +0000 Message-Id: <6afc8911.1f7ae.468f733d@gitrepo.freebsd.org> The branch releng/14.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=acea8d0466f3c413ac42bc2776f3677383c82727 commit acea8d0466f3c413ac42bc2776f3677383c82727 Author: Kyle Evans AuthorDate: 2026-06-19 04:03:30 +0000 Commit: Mark Johnston CommitDate: 2026-11-16 21:16:22 +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. Approved by: so Security: FreeBSD-SA-26:87.socket 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 f9ce5446f459..c90fe0196aa8 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1746,7 +1746,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 @@ -1791,7 +1791,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); @@ -1837,8 +1836,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);