From nobody Thu Dec 14 22:00:00 2023 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 4SrmVS3m9Qz53qP0; Thu, 14 Dec 2023 22:00:00 +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 4SrmVS3G0jz4sVc; Thu, 14 Dec 2023 22:00:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591200; 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=D5HFH41OEAlGmt7N+sR27a04mYDGE9G50td1vsWdNFI=; b=okZkczuuVzHeUdA/KtWuOaZw78tCYHmStCmmBPAH8G3cG511Gfgt7yPOap+MV74mxw2F8M brQP4UB/NsrbFZMNqumkNYeOplvm7x/SApq/CJAE0SnHteTZQ9jxJ+ZLKDXt1pCJBD7hFd p68RNKnYnmvY4uHCl4WlBqrT2u5KzbnJtWaBby2NbJX5sppcQWC7/s+acsFUWlfFUvP5w+ THNB/UduRXfj9ubtsWDJ6Gap/OY4psiS75uGqsSiQLHe+stfqBg1HUHJ62B7rwiOuI0Z5A 3throob+vpaiRC/S62+CLlIXmIvxD5sioJNyVAF/5JhzLGqKsmpF4Lg5gE2tvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702591200; a=rsa-sha256; cv=none; b=BEirdEZ1OpTxtWePz33PzmaAJEMnVAuRLq0C+msseeRizFN7NfA9eq3r2+QwFnNbha0U3o 3ilAkxF7ylRasa3Y9lL0dqWH/RFrjmzGQ3fUWgEx9b9L7nWCqm46LGDEk34fL8rqBfQdY9 GrcoVA8X3MARFWIRXRz2TfQtml65npiuqF3Yd7BeBGllkT28NBDSYcgEUGBsMCIEColkEa I/Tt4jO3ibBdIph/i/r9iU0zs7Toop7yXsMfRFZXwN+xjF3jRn7BPBG9D1naItZoeyVj4t rSsqK3O/sw+EIbR1tNKfPeVENEWPNUBIGrcHXDmLUSdR60X/Lgs6v5K6/UMAsw== 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=1702591200; 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=D5HFH41OEAlGmt7N+sR27a04mYDGE9G50td1vsWdNFI=; b=gzDordptoxD8VK3qHv4T3aTWFZMVdoqF0kbrwYTrsaDGFiEtP4dEwxWRw6r3xalhu/8S8t fQuvueA260k18vuQ2GrSWN4Va6oKs1AYbSUn/vFhA8un6Uk62TunhkbDJ1Pbb7uGpPI77Y gX/rLn321X6Lct8NDjB71IXUKxmSBv+TH8fXgU31gc1G2R06pd27CLkBB9jI+ruPlgsErd 3jeukP/vSA6Nrw8KEcMP5c+PzX2HBjm3eTWpEq4pBuXSWSd3dMs+SzFEqk3KI3OlzDA25b 9C9sDDDEBB0PoT0Z6CmzkdNsWUaZDSjHjJSo6DAQVAmmul1FymSQtpaDlVmCcg== 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 4SrmVS1mRxzkqW; Thu, 14 Dec 2023 22:00:00 +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 3BEM00TM010685; Thu, 14 Dec 2023 22:00:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEM007Z010682; Thu, 14 Dec 2023 22:00:00 GMT (envelope-from git) Date: Thu, 14 Dec 2023 22:00:00 GMT Message-Id: <202312142200.3BEM007Z010682@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: c196e43243b8 - main - Revert "mcast: fix memory leak in imf_purge()" 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c196e43243b83840cc9f3d1dadc7dacb3b0f556f Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c196e43243b83840cc9f3d1dadc7dacb3b0f556f commit c196e43243b83840cc9f3d1dadc7dacb3b0f556f Author: Kristof Provost AuthorDate: 2023-12-12 18:20:03 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 21:05:34 +0000 Revert "mcast: fix memory leak in imf_purge()" This reverts commit fa03d37432caf17d56a931a9e6f5d9b06f102c5b. This commit caused us to not send IGMP leave messages if the inpcb went away. In other words: we freed pending packets whenever the socket closed rather than when the interface (or address) goes away. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43032 --- sys/netinet/in_mcast.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index ee707414dc42..cae15bc4108a 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -914,8 +914,6 @@ imf_purge(struct in_mfilter *imf) imf->imf_st[0] = imf->imf_st[1] = MCAST_UNDEFINED; KASSERT(RB_EMPTY(&imf->imf_sources), ("%s: imf_sources not empty", __func__)); - if (imf->imf_inm != NULL) - mbufq_drain(&imf->imf_inm->inm_scq); } /*