From nobody Wed Feb 28 23:57:37 2024 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 4TlWW56x6wz5Cfhv; Wed, 28 Feb 2024 23:57:37 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlWW560TVz50vf; Wed, 28 Feb 2024 23:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709164657; 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=gDnW52Vw3fF20F6vHbfyEQrAS5bKADuYpdpQjOIGsBI=; b=eMWL7BwgirdAQTXoK31UtYGTArCf2fHqDaqCEY0qpQwUuxY6B9xK5c/WwKfXnC8CRuDpBe UPjNBexQN+UQtBNsI0eZiJJB+eY6S9T98JuBd2nhor3AfdIEVN47CQHTlQwR3vqTM/fWDS i0goRSEXUzk1K9OQ0HjjGci0NvyYIbPR6Qalelj88FbCUXDSXolrcHa/qDu4WgUzo9LShW HeEa32peSETxflWvwq3BdeFCi+lFn+tVQwU112PpbIz9eLJEoUIJxrg1yUFhU0rs5bT4fX bYYk46qy7vSO/JIBoOuNrcrd1Nx0Z6yG/8KGx01ZdnX2DFrROGG7Xo94BpZ0Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709164657; a=rsa-sha256; cv=none; b=wfbQOi/QIunL6D8TETTEtte5uHAVL86L3TB7KzKZZNiWeKvDV+pChfyogvxIU7fIc0ThBR ZGl0Fx/+06MylAaVIyyUiNt1STY8mzAkx2odzAfBFvozJlS5ntWGMwMmFPv6Qs05VV2VEa AtobpyWPmhfuAEUEv+CR8AcC6lluGSDgxClVwctkMfF67cIJePvZxpDk05obD64h6nM0wi +IDZnM87mzxgSAHIuptkyLIJ+aTmXqaAdlN7/mvXL0H2brTFXEFvccESqp7uDNiIOiidz4 /53QbgMVzSMU7MM5N0CYBUkWkiUP7NBf/GW/KS1l2dPgZ5HETvSyiVEA2v96gg== 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=1709164657; 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=gDnW52Vw3fF20F6vHbfyEQrAS5bKADuYpdpQjOIGsBI=; b=K5jyCHFgof8AZaxArFwFi8HPSJPCafeV5WOHodzcygJs4kMqYAPo1L5AeSPHaznbQhsgJH zYOlTUGqSfDQrZOz39ePUIYvERhtkvIiSGScaIkv5bo5PhjOPxN42u60k+2LFtrV5YztR7 ITKUf2aYV3nPGkymd+ZuZP+Kf2M5rcK1J8cL6MpZPR3m4Uone9AfcrsQA+wfCBXBzT1Ul6 Kffxs4kmBPEjeNN0zHIgbIGlZqOgXtijaEnalpxuaaImr+eOUDMagmfPE63h4zx3SRcFtG /ZRx+KA+l8dw/BROTsTDZoESeXS/kb4dnpyHzRwbryifh47lWyAZBo09cjNMTg== 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 4TlWW55bhJzJF1; Wed, 28 Feb 2024 23:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41SNvb9w045364; Wed, 28 Feb 2024 23:57:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SNvbNV045361; Wed, 28 Feb 2024 23:57:37 GMT (envelope-from git) Date: Wed, 28 Feb 2024 23:57:37 GMT Message-Id: <202402282357.41SNvbNV045361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 7ee47c3bb7a6 - main - sockets: in solisten_proto() don't call sbdestroy() on a PR_SOCKBUF List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ee47c3bb7a6d85744e2747ec969161eed5bbaab Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=7ee47c3bb7a6d85744e2747ec969161eed5bbaab commit 7ee47c3bb7a6d85744e2747ec969161eed5bbaab Author: Gleb Smirnoff AuthorDate: 2024-02-28 23:57:04 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-28 23:57:25 +0000 sockets: in solisten_proto() don't call sbdestroy() on a PR_SOCKBUF A socket marked with PR_SOCKBUF has protocol specific socket buffers and will take care of the in its pr_listen method. Right now we don't have any sockets that can listen and are PR_SOCKBUF, but that will change soon. --- sys/kern/uipc_socket.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index b647766cf258..18ecf1409fd7 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1063,8 +1063,10 @@ solisten_proto(struct socket *so, int backlog) sbrcv_timeo = so->so_rcv.sb_timeo; sbsnd_timeo = so->so_snd.sb_timeo; - sbdestroy(so, SO_SND); - sbdestroy(so, SO_RCV); + if (!(so->so_proto->pr_flags & PR_SOCKBUF)) { + sbdestroy(so, SO_SND); + sbdestroy(so, SO_RCV); + } #ifdef INVARIANTS bzero(&so->so_rcv,