Date: Wed, 5 Jan 2022 02:42:11 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 3f6ab5493f4b - main - vtnet: don't leak pfil(9) data on detach Message-ID: <202201050242.2052gBvI021479@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3f6ab5493f4b89e7625dd31f807065cfae6c503d commit 3f6ab5493f4b89e7625dd31f807065cfae6c503d Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2022-01-05 02:41:05 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2022-01-05 02:41:05 +0000 vtnet: don't leak pfil(9) data on detach PR: 260667 Submitted by: <ghuckriede blackberry.com> --- 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201050242.2052gBvI021479>