From nobody Sat Mar 23 05:45:41 2024 X-Original-To: dev-commits-src-main@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 4V1p861Yknz5DZ6w; Sat, 23 Mar 2024 05:45:42 +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 4V1p860hCCz4C9d; Sat, 23 Mar 2024 05:45:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711172742; 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=XGtjrtEe0XhJPHWFTchC6VkvEuq8KlW+incGdGkztak=; b=fz9AbBnD4acPdzglY4P/J1oNmDbGYgi5vTFLdktU0duRg03TF2pjPmSJznF+TsxD8nJm7p l4Qn+lKrQIs+XTokY3T7cT68DtUS9flC4eisAGZJEF/IN6RuEzdR2/vfO90c+rH4jRJsuQ /ey9lznoBpFjXN/eSSdEXfxrGSYTF0FOtwW/eDui8eVyUhkMmEIwt5YEYuFjVJqYeCirIJ AuYiNaoYog+VQSBieLI3rstlU/uo/Kt4APXRLyTfM8jcu9xO6YIKHZvUNFvY/mTHCKd18J N2dnv6gb1uE++e51SeTFQGM1rTUvwd2wlUBNKscNBwrqbNKrB1MZdHSZYc6bDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711172742; a=rsa-sha256; cv=none; b=mrTp57RFTbGyYUo4bM9IZb2KJURerRXmFQ2dFir9UGAVtPF4q6o96lb8qUQVv8l/ZoiNv0 LIb2GO5Dknvr7BrMtXrIQ/Lu7yeHh10/BAF1MxlncOP3EC5VikkDMKmtNeNLBIb1wCFLhO w3VqUjkB3ENCKDN5ZAkMAPkwJi+brS9sbMb95jpVsxocFm+3gBckynQQRL/45zJx22n6TN JQQuit+AUfk2FyjNDmlGtd5jqIzyjra8Y/ylEQXpaUfGILPwllRRbEZfOVDrMbBjcUu9V+ eVBmCpYljeC0SjhuC/o6lS6Zn69CmcWx92sNg5lHbWUuDZR4NRmaepnpgSKiOg== 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=1711172742; 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=XGtjrtEe0XhJPHWFTchC6VkvEuq8KlW+incGdGkztak=; b=KplsKHwslLYzupFlRvged7akY7M7YFHK+id1OprrWqekTjG+BehTDogKCcTNvMg1ZpLztU NS+C6uYikd8QrHi0UYcjWVeDky54krIE7N/qp2Hud2Ytd+mJfdzfJksU292GFQVOecyzXC pyRlOClmkpCycN91UhzrH4SKsfqRulo0DGgf8uTwSqIqpvyBKrMYJQDNjEI6+98ohI7nN/ fXCRHk+TNh++V5hhyCco2fd3zlfbxBVTfcjt0YXIkEkAHa85O6bk7KsE1yeycXLhdiC3qc tknKR0+/YwI9UBa773Ueu/Ra/r0f9vrUwtSW5gxZ3CMVJ4FG4bKjd3VcQ03Idw== 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 4V1p860HWNzcGc; Sat, 23 Mar 2024 05:45:42 +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 42N5jfj0046916; Sat, 23 Mar 2024 05:45:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42N5jf6K046913; Sat, 23 Mar 2024 05:45:41 GMT (envelope-from git) Date: Sat, 23 Mar 2024 05:45:41 GMT Message-Id: <202403230545.42N5jf6K046913@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: 1a3d1be4965a - main - ng_ksocket: use new macros to lock socket buffers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 1a3d1be4965afddded0b2582b9c4969c1e6a4129 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1a3d1be4965afddded0b2582b9c4969c1e6a4129 commit 1a3d1be4965afddded0b2582b9c4969c1e6a4129 Author: Gleb Smirnoff AuthorDate: 2024-03-23 05:44:16 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-23 05:44:16 +0000 ng_ksocket: use new macros to lock socket buffers --- sys/netgraph/ng_ksocket.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c index 388fe9557db3..3e4427f9e387 100644 --- a/sys/netgraph/ng_ksocket.c +++ b/sys/netgraph/ng_ksocket.c @@ -608,12 +608,12 @@ ng_ksocket_connect(hook_p hook) struct socket *const so = priv->so; /* Add our hook for incoming data and other events */ - SOCKBUF_LOCK(&priv->so->so_rcv); + SOCK_RECVBUF_LOCK(so); soupcall_set(priv->so, SO_RCV, ng_ksocket_incoming, node); - SOCKBUF_UNLOCK(&priv->so->so_rcv); - SOCKBUF_LOCK(&priv->so->so_snd); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); soupcall_set(priv->so, SO_SND, ng_ksocket_incoming, node); - SOCKBUF_UNLOCK(&priv->so->so_snd); + SOCK_SENDBUF_UNLOCK(so); SOCK_LOCK(priv->so); priv->so->so_state |= SS_NBIO; SOCK_UNLOCK(priv->so); @@ -1231,12 +1231,12 @@ ng_ksocket_accept(priv_p priv) */ LIST_INSERT_HEAD(&priv->embryos, priv2, siblings); - SOCKBUF_LOCK(&so->so_rcv); + SOCK_RECVBUF_LOCK(so); soupcall_set(so, SO_RCV, ng_ksocket_incoming, node); - SOCKBUF_UNLOCK(&so->so_rcv); - SOCKBUF_LOCK(&so->so_snd); + SOCK_RECVBUF_UNLOCK(so); + SOCK_SENDBUF_LOCK(so); soupcall_set(so, SO_SND, ng_ksocket_incoming, node); - SOCKBUF_UNLOCK(&so->so_snd); + SOCK_SENDBUF_UNLOCK(so); /* Fill in the response data and send it or return it to the caller */ resp_data = (struct ng_ksocket_accept *)resp->data;