From nobody Wed Apr 17 13:58:47 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 4VKMvW4jdqz5GxGs; Wed, 17 Apr 2024 13:58:47 +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 4VKMvW3v1cz4s1n; Wed, 17 Apr 2024 13:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713362327; 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=UPeMYOOU5t+rsd0jECC2hmFxkCFSNlsPFcH8WOVnhTk=; b=yp+QdXugmkKguaOn8EJeB1zHUvWoHtG0ErWeWaNa+4VVD+U6n0Hxy4xBUqOFoV2YUcejyU HI9ZNSXk8OnMkd9+fmqRV5EYnIi9qwXS+gmJUYGe4pw/LB/uf+Op1H271lzFcSoSxZ+K5M JnaK6CyqWaKray0v/TB7oBc1lBLDAkobPum2Y4L4wW9k1urYFJuVeIyNwO7x2hK7xZ7SGq kgrJ63y0TknlhhDDWibxGtytw+JGC+ULBLjc6lIuZAvL/KjXIw4poUzhfh38VT2YB7lXX1 B62jGO7+OeoTkh1Q8+uKUKwdPPZc+iVX3bY0lzRGqPl3KYUmEZ5dNrMrX/SosA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713362327; a=rsa-sha256; cv=none; b=brZzgvrq/MqBedeQQ1rRcVs8b32DpVRq9GtohtcGROaCv49dc3R5h8nh+FISen38lz0Vn1 7/cL1UM0S3BrhwgePvR8XS5PX9RcsRaknYf88v89NbBkrArenHtbTxKP8UElm4MMWH1Wz8 jzxamL63qVpPxu0YK5XdGQFQAycS4jd9or/PtrEUXC1TQnTHnieZ6HELJYyfLQTdFWrNxZ sENMRptKScvsWSzD0g66mWFIYJARL0GXdZzGM4hsg9/O7QkZkzMMmwGL4mTOh1HVVoUwST +AGQbnLAtSTbl7bGRYoPHexZCouSvRU35BIFaEp3Wrhxbnj/OKul7Z8phVGQaw== 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=1713362327; 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=UPeMYOOU5t+rsd0jECC2hmFxkCFSNlsPFcH8WOVnhTk=; b=SnrP2sLli0kvm9Vu5VUGYDUKQOk4z2/QIqQeT2DSCGJM05rxHXmsLZBAXFISSgc2mL06CB OlakJJnZ56KQgXwyavnMyNDBw5r+zErp8ZHRpxfR5be5NDrVUogD559V0aCfBbUxY9NYbX DuJwKGKKuIOnOLv8Klhfhcj3odzAyR5IIg2vxLSb/E/cyU5JOMmpuKEJSOl27x9VcjLz5Q ZIRVtTiGA75IgTrfKWG2Gu4939UEuP1+dBQocjEqrO0tZXGWD6bicltKCzH5EjJG9U0oAq dThvHdHQWNUgCC9STTn64PMAussCf1ZkS+gR7xvE5VnlXuFXkjP9RrTomJiN6Q== 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 4VKMvW3NcSzTCB; Wed, 17 Apr 2024 13:58:47 +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 43HDwlrK038141; Wed, 17 Apr 2024 13:58:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43HDwlEE038138; Wed, 17 Apr 2024 13:58:47 GMT (envelope-from git) Date: Wed, 17 Apr 2024 13:58:47 GMT Message-Id: <202404171358.43HDwlEE038138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 7a019565ff6d - stable/14 - 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: 7a019565ff6dc6efb5c6ab091343740fd6dd0377 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=7a019565ff6dc6efb5c6ab091343740fd6dd0377 commit 7a019565ff6dc6efb5c6ab091343740fd6dd0377 Author: Michael Tuexen AuthorDate: 2024-04-05 16:14:54 +0000 Commit: Michael Tuexen CommitDate: 2024-04-17 13:58:22 +0000 uipc_socket: handle socket buffer locks in sopeeloff PR: 278171 Reviewed by: markj Fixes: a4fc41423f7d ("sockets: enable protocol specific socket buffers") Differential Revision: https://reviews.freebsd.org/D44640 (cherry picked from commit 681711b77cde2cf3d64dc1e4951ec8287bc4f3e8) --- 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 880dec89245b..5faf018dca11 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -924,6 +924,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);