From nobody Wed Jan 05 02:42:11 2022 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 35763194408F; Wed, 5 Jan 2022 02:42:12 +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 4JTDKH6dgLz4Ycs; Wed, 5 Jan 2022 02:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C4124247DA; Wed, 5 Jan 2022 02:42:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2052gBTC021480; Wed, 5 Jan 2022 02:42:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2052gBvI021479; Wed, 5 Jan 2022 02:42:11 GMT (envelope-from git) Date: Wed, 5 Jan 2022 02:42:11 GMT Message-Id: <202201050242.2052gBvI021479@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: 3f6ab5493f4b - main - vtnet: don't leak pfil(9) data on detach 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 3f6ab5493f4b89e7625dd31f807065cfae6c503d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641350531; 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=x1nSHJdYpjyd7g8RWdKbBpuEdw1xUPiIe69GQZzZbJo=; b=kNaZS6wThj6jQN1B0eHLqHt23TsdML32nt2rY1lUkTREez9dZIjXLNpbxPtr6g6Dn2n5T7 D59A4HfFBDcKg04xU3cw8RTDlQhbCUkZx8C8ndHBnpja4F5+4raTO+Cg54LASptcXPBjOd GqKjFkvN7eDAcai0ovr4jv99pWsaSh/073+OkOVwDY2WGZGzRhGqEBm+pOw0tNaryKMzFX 8VSfhbjpPxyACy4quEDkdn86j226krCtkfxhkltSctK0MZbeGpdkhXYWkIt/VT9O9cVhQw vm/awi4WtWnWv2eGPlaBS7PdO/8SaxbimTQxXppAdv5tC/Y+LEOvejUkkUXBHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641350531; a=rsa-sha256; cv=none; b=VxwsMIJIPcHf06D8aqFckqbW7ma3QLjygfBAZ/QQBaXFyP+8Li5jT1wRgvJ990Q+ESofEC /Pugw0kxXK0kDGX31kHDThveB1LhETyKs0mzxaBQ9RI3/oVyleFj1Iz5pysyjRsjH4cwyP wDVj3RDgTecAe0r3IReKjbewFq4hzJlfFggiNyIgtm8tf+ZN9iFv5Ss5blB28DziPucIp0 7cbwFRAjBfXxAipkpOoqFOH7MWOVTJiJccpevpEl27QmHuYdmk9vz1wuCp8RLLdzFH47kX 3DUc7PWN1PZf2ZgLKWjL6yk64I4fXGFtUz7CXepBZqQGphsffa/65VmvA8yBNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3f6ab5493f4b89e7625dd31f807065cfae6c503d commit 3f6ab5493f4b89e7625dd31f807065cfae6c503d Author: Gleb Smirnoff AuthorDate: 2022-01-05 02:41:05 +0000 Commit: Gleb Smirnoff CommitDate: 2022-01-05 02:41:05 +0000 vtnet: don't leak pfil(9) data on detach PR: 260667 Submitted by: --- sys/dev/virtio/network/if_vtnet.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 913ae5e50efc..d52a1bfcdc23 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -518,6 +518,11 @@ vtnet_detach(device_t dev) netmap_detach(ifp); #endif + if (sc->vtnet_pfil != NULL) { + pfil_head_unregister(sc->vtnet_pfil); + sc->vtnet_pfil = NULL; + } + vtnet_free_taskqueues(sc); if (sc->vtnet_vlan_attach != NULL) {