From nobody Mon Aug 26 15:51:53 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 4WswCY4YWzz5T7Tj; Mon, 26 Aug 2024 15:51:53 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WswCY464yz4s1D; Mon, 26 Aug 2024 15:51:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724687513; 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=ZEYv/unH5+0QmDenqvD9xeQJxOGSmXNfS9qXmlC0X9w=; b=A7KTiclbXQDjdCPYljgI6EJ3PNtR/rklJWh0dL52JVsdQ/CwjAteNqFCyCJD2WJQz22+vn m5b4o00rN8HkbeRST3nAl7Nf4IGjfOA4ns+0z3DbUVDjxaTvGz/RTZ+nBzkliD979EoMWz j0sb+TQ8dDozqQMnIuQsod8IGOhp6csAvcAW6qFSzi+SqMI0j5iBuFM/BaSMulrHBMRhR+ Z3RfqgW6ekyQlI+j086L+kYgtx7sUjCwQgnJS6vKWF+Zstx6qtV0RKXYowSsnLp+yZzuNQ YzECU6mMxzviJeSKGZ52Du09Zem4rbBEBqkNcpNmPg9pGQbQ/8412fQcGAw3Ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724687513; a=rsa-sha256; cv=none; b=bnC4jWBwtWqlnotzjWZQxXXGBsVKoVdWFDkOKnmJf1AqIpAbD2vhP0lLa9vakCx3DkgVFP mggZTtqFJvd3U3FxKNqB4XLsB2ZbftwA3WWf9kvBiTD/UcZvdWouSKDJWaGDRohkHAdEFI i4Eqlyfg60J6E3yqU59wjNDeoSy94rPYGrj9ZBFiy+syo2a86tOqgLhSvQdXcxCc3z8aBI lgNmL5lwa7J1zu/9UgE+4cX8Xnh6fCMW/rRaQ4WxomR+imk9CdiOT5W44VwvxKGpBKQJtJ u867idtx1qlzA50UM6OjwOWDpzgjZBTUn9qguY3HeKwzYmWbcX5M+o7nBOeyZA== 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=1724687513; 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=ZEYv/unH5+0QmDenqvD9xeQJxOGSmXNfS9qXmlC0X9w=; b=JPy+fQ38PYt3osV4NhsHJ2SclGGjKJwLJBJRot9RTsjnDWZU4sSoao/iVW/w8RT9OZc9rg ljlSUqFOTJpzHyrKJo4Hk9KTAMB4QBB8OYD/Hbj20ofGbNPLcwGquSsnZtwSyVJP2pjbb0 jMVMYt9W2engYdw4/G7YUr+19ril1pTV1QVaZjDo8g44JXogpVrUZlrS0SAhesUdhgfIG9 8+UmSt4e7zxpRo/YNSKq1LK0rN35KlMzCR3cbUfA434TsYsN880gNMVcBDwD52PJQuYSw5 A8zX7p5KBNjw0T+vX2udYRqZuOSrNGo0xiPBohwSS73yOdkhGjRjvU/SUOabzQ== 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 4WswCY3jgFz1CTy; Mon, 26 Aug 2024 15:51:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47QFpr2a015384; Mon, 26 Aug 2024 15:51:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47QFprrl015381; Mon, 26 Aug 2024 15:51:53 GMT (envelope-from git) Date: Mon, 26 Aug 2024 15:51:53 GMT Message-Id: <202408261551.47QFprrl015381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 31ad232d8565 - stable/14 - 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: 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 31ad232d85656af77726626decce6c2b7fd824f6 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=31ad232d85656af77726626decce6c2b7fd824f6 commit 31ad232d85656af77726626decce6c2b7fd824f6 Author: Kristof Provost AuthorDate: 2023-12-12 18:20:03 +0000 Commit: Warner Losh CommitDate: 2024-08-26 15:45:58 +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 (cherry picked from commit c196e43243b83840cc9f3d1dadc7dacb3b0f556f) --- 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 94fc807ccea7..f93c4b0dac8c 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -915,8 +915,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); } /*