From nobody Fri Apr 05 16:22:46 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 4VB3gB2RGMz5Gm4Y; Fri, 5 Apr 2024 16:22:46 +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 4VB3gB1xSLz4VTj; Fri, 5 Apr 2024 16:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712334166; 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=2hdGLAnP+e1eB8eJrbecH06MTmWiN6VSsN0B9MujehI=; b=nKCrB4lUXDTH0y1MFULFZ099z0TNPoDi/I+OoIJUPr7V3C02L4yTnOtZbBFfXWrIJEcYQd PoPXmXLQfxq1ydFzblWrcIt4Taz8IGmBT0qYyiW9a518LyVYcXdX5MDDTb11I9fRSyZyWM CVI0/XzLZTfFz1sPNIFZoXX2uHjuS2UZqmixvQD6XJ0gwbQxYPYaNB0W0C544+pHZnGCzi i04lLP/XNeUsGnCq5vZvajAnDKsALBQTsz+eMtTi1x0GOXC9eO/d/pABEgXCUL+pr2nDxz G5SmzlGX7org0PMpLLtM+HKxRrLn+dwtRWeuAFYynSOHPN+uQop0dG+g40ev7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712334166; a=rsa-sha256; cv=none; b=BvUZqzcxRLrZ9OsMQcc9P5s3PnW0Xdb2FdOQDBPMraj0E74MLMtf9MNfDg8MvA6vuKY4jj ekLZ9NvS6UoFWyT/Ur2Lbe3U/9fMcPSM0N7wuzbuohiRFo4KvYy3qn+8U5vF1kuf9wLAqf IyQz2i5ShblQ+c8YjWg2n7olJG0KTmq1meahlpr/Eu5JDmrgL+OBn0E5cy2FAo9k73/y4G kgNL9+GzUxRIX9i3nQINcUVXjy1x9KnHYJ/9d4keInj0ee1+VMvQ9MOFaAlU94Dle3a1LS xIVUSdJJ3AgNhh+HfyXLZLsBryujjNwzjGW6G8Cql1Nn14mok5Fve08zZW+chw== 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=1712334166; 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=2hdGLAnP+e1eB8eJrbecH06MTmWiN6VSsN0B9MujehI=; b=Tn0EOrk5a3AS5UPSW0+SvZbbPsuidYKOMgu0Ns8TnAYncGwhL2aHMQ/mOmbVVl7sTs3eFk iY7pIsMchkDXgKzuHCcj1+m5vXeI1FHv6MqXQATXBzvWZUclREukxI58mBF12h5uvggmDt r6Q8uYBp6QnRzbFirb/jyCLeEkiyH5GcQHi0UyGIjMl5DHtE0xdCBKDTZF8lgzMeCzkGDQ ewbYUEPpebLtXHQ8ameYctY4f2GjaeCXWxm7YSb/qqsBosLagk0tbASWinqIDynKq4XEUW oiPupARsp6373oPVvNu0OlKWRP4cS1fOmOGDShuIf2QGzNeIWcu8u0TqsU/pnw== 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 4VB3gB1XYVz16kh; Fri, 5 Apr 2024 16:22:46 +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 435GMk5Z096464; Fri, 5 Apr 2024 16:22:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 435GMkEe096461; Fri, 5 Apr 2024 16:22:46 GMT (envelope-from git) Date: Fri, 5 Apr 2024 16:22:46 GMT Message-Id: <202404051622.435GMkEe096461@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 681711b77cde - main - uipc_socket: handle socket buffer locks in sopeeloff 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 681711b77cde2cf3d64dc1e4951ec8287bc4f3e8 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=681711b77cde2cf3d64dc1e4951ec8287bc4f3e8 commit 681711b77cde2cf3d64dc1e4951ec8287bc4f3e8 Author: Michael Tuexen AuthorDate: 2024-04-05 16:14:54 +0000 Commit: Michael Tuexen CommitDate: 2024-04-05 16:20:19 +0000 uipc_socket: handle socket buffer locks in sopeeloff PR: 278171 Reviewed by: markj Fixes: a4fc41423f7d ("sockets: enable protocol specific socket buffers") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44640 --- sys/kern/uipc_socket.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 196461f645ce..82fbcd4a922d 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -922,6 +922,10 @@ sopeeloff(struct socket *head) so->so_snd.sb_timeo = head->so_snd.sb_timeo; so->so_rcv.sb_flags |= head->so_rcv.sb_flags & SB_AUTOSIZE; so->so_snd.sb_flags |= head->so_snd.sb_flags & SB_AUTOSIZE; + if ((so->so_proto->pr_flags & PR_SOCKBUF) == 0) { + so->so_snd.sb_mtx = &so->so_snd_mtx; + so->so_rcv.sb_mtx = &so->so_rcv_mtx; + } soref(so);