From nobody Tue Jun 04 00:23:18 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 4VtWXR0NYbz5Lb5f; Tue, 04 Jun 2024 00:23:19 +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 4VtWXQ6gvKz58w9; Tue, 4 Jun 2024 00:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717460598; 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=r021potMeUwanzAC6+MwWK4TtSDoV6ENrDTXgKExdtg=; b=yBm/o1CbC7jK4m9QjMttJr0WLfdtsoQP4h8uu+Rhi8TNwpvcYMogSAnmq4wXtRnqdwsgNL Jbdg2bmYJt9/XXDnTwIpN+NPxmAi8xCrsCkNyHRLdxpLviDCf8yqQ7UiR/6fIaAjV2NB2I 2dPdyDHMRlc4XuMUQbONwHdOr87FmWDDeM5m4jeG0aI0y2g056Wk7YNzFiNduwtoz/AwBc Il3fTNxCqd/QghofQwJaLBrsYOFLcmuZEdUTRyq6n05R59c9rwuaMl5F9gpW62wQOUAXye fiq65t0Q+sGgWZKXEkTMZc0h1dibZMyLvs+GGy29pOZs1R3YGOR145cKi/8uHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717460598; a=rsa-sha256; cv=none; b=hbYFfra5WHRII35d+H70pRv8zmvap0+5TAHDM9zBizjvvKQg3fWYBgjus9efN7f+00OEVJ xxe4JAVkPGGdcGAtTPMzdyrPM2s8S1hEHAiA8lxV9YvrON7FD2FS8etKJUgRSzy3NYXxCo T7/y7j9+MN9n1rZghN1k1S1OvbaX2XoHLx75mJNKPLxSyNLALzsJzAyI6fdq9+A6qy1+85 hqDkV1xdygEckCNbYB+/kTYNYCxIvpvh4ybi+CENOnZGCDAZ2Hx2K8GlcZc6mQBEmqwaH8 h+3TlK9COoqnQiUtxS1jWy7R+geyUjZJp03J07QnXONHkdHJQ3+0NTabbBvKLg== 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=1717460598; 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=r021potMeUwanzAC6+MwWK4TtSDoV6ENrDTXgKExdtg=; b=P7YHn2/Mnz0wqDHbYkfg7q3A/BdXL2yeS0uuFDhdpylkd7GJpQbrg8PStiHaZWSnvkFlZo oFN1ozUpRlb0GxRsFFx5SI2k7svmkcP5d/alQQvDzxpmmRWMI5RKSrCKRd8xmr+Z+HZuY+ uEBg9uiYU6N2c/LBjnl0kNyigEwpgpD5Ljcykh/ypF7AY1bEwBmGkKD5lDtxnJjyA742gU UqC03/lCY6efFLB8TWyotDwA90Qqk1TlcWu+ZDZnAmqEWUtrSo0SmCXLt/Z8anMR666kC0 /FIvbLSA7tikNYabwSgSMloqnlfVT9kINYqo2IAp0BTekQHxjs9U5mKgybOT1g== 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 4VtWXQ6HKTzx1L; Tue, 4 Jun 2024 00:23:18 +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 4540NIPL077403; Tue, 4 Jun 2024 00:23:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4540NI1m077400; Tue, 4 Jun 2024 00:23:18 GMT (envelope-from git) Date: Tue, 4 Jun 2024 00:23:18 GMT Message-Id: <202406040023.4540NI1m077400@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: a9b55a66440c - main - unix: use m_freemp() when disposing unix 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: a9b55a66440ce67e545b60f2861badbfc5ec6327 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a9b55a66440ce67e545b60f2861badbfc5ec6327 commit a9b55a66440ce67e545b60f2861badbfc5ec6327 Author: Gleb Smirnoff AuthorDate: 2024-06-04 00:22:33 +0000 Commit: Gleb Smirnoff CommitDate: 2024-06-04 00:23:06 +0000 unix: use m_freemp() when disposing unix socket buffers The new unix/dgram uses m_nextpkt linkage, while the old unix/stream uses m_next linkage. This fixes memory leak. Diagnosed by: khng Reviewed by: khng, markj PR: 279467 Fixes: 458f475df8e5912609c14208c189414a8255c738 Differential Revision: https://reviews.freebsd.org/D45478 MFC After: 1 week --- sys/kern/uipc_usrreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 6e83e2be6f05..0f01afa97878 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2190,7 +2190,7 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2) if (m != NULL) { unp_scan(m, unp_freerights); - m_freem(m); + m_freemp(m); } } @@ -3280,7 +3280,7 @@ unp_dispose(struct socket *so) if (m != NULL) { unp_scan(m, unp_freerights); - m_freem(m); + m_freemp(m); } }