From nobody Tue Jan 30 05:39:27 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 4TPDWM6mkHz58Kw5; Tue, 30 Jan 2024 05:39:27 +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 4TPDWM5sCZz4Wc0; Tue, 30 Jan 2024 05:39:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706593167; 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=Wwzd9H9Qy2DWnG7AWnklJ/yXqn8uaVx+8Q09wk/6VHw=; b=doIZ8QPZnLXXrfVp083RI47QW72KghwodxKlPjgFPOfMDICSVS1QsPgItRqD2HKki+ewta 7dLv04onA9ftfPVeemkQ1OFnXXuOrlf++M4T2g63wloozkSC9rvnYvqVMKq7jKk/U3IPfE i6Vk1nuAeBx5AS1Ot0lCOIQVIHDTd28YAcHwY10RrQXuQz/BXbIzhtQbRP7oJukAUUTahW vHxLwDAETSanLVc9czDmUZE2aRgSfBKJMapCEObZ4PNBNP7azZI6y+Lwnm+vxT7Rw9hmzb V1lv5W3WbrQRu+jDhDWcMzEzepxtnquD08zZBtrLaEym1WKx1iqYGP9omkND8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706593167; 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=Wwzd9H9Qy2DWnG7AWnklJ/yXqn8uaVx+8Q09wk/6VHw=; b=tH9OtFCJfKvNW1K9OmktfSq7X+xEMgCdImtfRrxtlAAEU2V0MPfYlzfKAgHAqWPXUVF3eP Rvf58dYYO+IsCv+NRG6irqo7O6JU6jfmZYIUgDQBTEYZWPD+cs9yb/8EM6vWe0nJ6Vp4Xo hLzIrsaUE+8P+PfuZGMRBRzb9MX3jIk0ofKusGomknq+5C9CWZ3WfoAp3gvsa4Mxt3nNd2 NVRcL4J0iFkX9CGKyXn5eRC9qV6vDXAG4RbJGhbajA4rVMnSM9Su7GXLargWUhjYt1BcaZ zu8gsh97q+ZnSzJgZJmUSeKhdR1NnXIk6wPtCGhpdTxb9mQ2tQ3UDdxHk49d2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706593167; a=rsa-sha256; cv=none; b=tR7qB1OEcP4rQdz7UvbTx9oVAw5rntVURyheloK+3rm6CsDEviYdAKUUyWCmxCrj2Nu7Tm 2ixdoPCwxiBDB9vmErJzkym5ZTLyR9LaYnKCKVQLXU3mh6hAEEZceN/nTNhJZW0bD8KS3X 6IDYDTs11PUIxijARnWb+nuAtC59QiQ+o5H61rAe5xqTcyREMOvsVU1ipue4aWgpNTOTXR 3XOxjDvljSOghdRrokLmVv/2BHgHn7PJVlikAuqhS66tFuQgawePw7BLBb7MoV0RAfGaq5 Ws1M6AW9cFqbT8acOg+I60GhuRO+v4OErl2uj9PrBDCai0Zy+CSZm+0WyFbCkg== 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 4TPDWM31rtzNYK; Tue, 30 Jan 2024 05:39:27 +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 40U5dRm3019388; Tue, 30 Jan 2024 05:39:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40U5dRGs019385; Tue, 30 Jan 2024 05:39:27 GMT (envelope-from git) Date: Tue, 30 Jan 2024 05:39:27 GMT Message-Id: <202401300539.40U5dRGs019385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: c0c932b27f95 - stable/14 - wg: detach bpf upon destroy as well 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c0c932b27f9551742daa84b02967f3021fbfef52 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c0c932b27f9551742daa84b02967f3021fbfef52 commit c0c932b27f9551742daa84b02967f3021fbfef52 Author: Aaron LI AuthorDate: 2024-01-22 16:18:56 +0000 Commit: Kyle Evans CommitDate: 2024-01-30 05:37:36 +0000 wg: detach bpf upon destroy as well bpfattach() is called in wg_clone_create(), but the bpfdetach() is missing from wg_close_destroy(). Add the missing bpfdetach() to avoid leaking both the associated bpf bits as well as the ifnet that bpf will hold a reference to. PR: 276526 (cherry picked from commit 43be2d7aaf25b719aec8f49aab110c0061f1edec) --- sys/dev/wg/if_wg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 738b1e76fa85..c324b5fb048b 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -2874,6 +2874,7 @@ wg_clone_destroy(struct if_clone *ifc, if_t ifp, uint32_t flags) if (cred != NULL) crfree(cred); + bpfdetach(sc->sc_ifp); if_detach(sc->sc_ifp); if_free(sc->sc_ifp);