From nobody Tue Jun 11 01:33:51 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 4Vyrmb3PtRz5NLbj; Tue, 11 Jun 2024 01:33:51 +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 4Vyrmb2j9tz4mtD; Tue, 11 Jun 2024 01:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069631; 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=sLKzVWpxx//zMnpfq8dciJ0e6CKODOU1Rbhfx99RWk4=; b=vapllASqZLXJpCuSoq0v5J/Ufdxnvhwd1dtWYDt2bY2sbGVvfbhtT7c+2cc/O2yx7UO0CD QEh5u6ZuzpACwB/Ns3OHmt5EqoAv1bEaLDscWDOs0iv151gWbASQLLmmBw6KIqa9tj03d2 ELwWBn41+KrgrxXSZn4wptMGgxQ5EExDA5kmxpMFXiI6G+iCcj3s6Ilqe2qgb3E39EJsPx pmq0izGfMDsuEEvrepF2dzayckSGqsqAGeM81zkGH7mR2+6H+01zcCRwmOjLcvxBaVizd0 /6W9c8eMtwgQDoDJ+qmiJP28O82/kuj9axmxs5r+IrnLSgR3jeKwX/x8dCacRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718069631; a=rsa-sha256; cv=none; b=ZYxbkidHMRBotF4YwCnSI/sGJ/+StqMqz/mZ+awchpHjLLM+WITDODvH18uzflslQd8rpu lf6jMeON//TSbmPr01H9cevIOUy7otakzXzgtzh0RGWvjz2qzqMtTepSAYh6mXPa/25Nx2 jVfSuVVKxT7GwOkOgJIiAR97LpC1fq4FMHVWouZvB+npraIomIJMm/1dgnvrPIpvUtrdbz bkCJ6e5dmx8FmRPgiQX7hOX0eXREqs97jOssJEZc72fO/Gd5PAE1UjjCy2tC5sfKwNMGkV 3P8dIA1P+cwp7e6Lz8fNmjmC0tBnk0DlVadRGDysCGnbQ2FRpd2rnfZpu2uWnQ== 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=1718069631; 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=sLKzVWpxx//zMnpfq8dciJ0e6CKODOU1Rbhfx99RWk4=; b=Uz9O6nY1neYmK/A3JMM3VyFppMfe21rax2pIF1tG+LZUTiMz4RAH42C7EcYAOq1jLMD20C h85GvPT1aLp2CFPWVCq/VPhYw5lucMY9ZIcm+R6YCg2wmcU7cB3KURtsOx096I+r5uDHiC 62p3JdOmFM4WFACvr3Pn+gETb3j4HBYZ2YVJ7BIYZonMJdCDKCFHIjprx8xKJlQfyKmJZz +5RbeWfCoWHZux/fXPnTlXoj9AkZLasgsdoXg5aopcMoaqg0PIUXt9I1Q2IPYE/5SAV8pw pRf91LD/TYYuYSYNcHPIEITSdfxH6Dc4BSPvxXocsC8j6Iyyc5d9+WShFKfw5w== 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 4Vyrmb2KbMzpgs; Tue, 11 Jun 2024 01:33:51 +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 45B1XpGv068730; Tue, 11 Jun 2024 01:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B1XpOC068727; Tue, 11 Jun 2024 01:33:51 GMT (envelope-from git) Date: Tue, 11 Jun 2024 01:33:51 GMT Message-Id: <202406110133.45B1XpOC068727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: f70581ff7d55 - stable/14 - unix: use m_freemp() when disposing unix socket buffers 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f70581ff7d556aa49a130fa24c876e74b877278c Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f70581ff7d556aa49a130fa24c876e74b877278c commit f70581ff7d556aa49a130fa24c876e74b877278c Author: Gleb Smirnoff AuthorDate: 2024-06-11 01:31:08 +0000 Commit: Gleb Smirnoff CommitDate: 2024-06-11 01:31:08 +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 (cherry picked from commit a9b55a66440ce67e545b60f2861badbfc5ec6327) --- 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 e54cd01956bf..87b82763b5f1 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2189,7 +2189,7 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2) if (m != NULL) { unp_scan(m, unp_freerights); - m_freem(m); + m_freemp(m); } } @@ -3276,7 +3276,7 @@ unp_dispose(struct socket *so) if (m != NULL) { unp_scan(m, unp_freerights); - m_freem(m); + m_freemp(m); } }