Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Dec 2021 16:26:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 260667] [vtnet] net driver leaks when detached
Message-ID:  <bug-260667-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260667

            Bug ID: 260667
           Summary: [vtnet] net driver leaks when detached
           Product: Base System
           Version: 13.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: ghuckriede@blackberry.com

Overview
--------

'if_vtnet' driver is missing the 'pfil_head_unregister()' during
'vtnet_detach()'.

Included a patch, which assumes the fix for bug #256714 is also applied.


Steps to Reproduce
------------------

Attach and then detach vnet device.
# vmstat -m | grep pfil
         pfil     6     1K        5  128
# devctl attach pci0:0:4:0
virtio_pci1: <VirtIO PCI (legacy) Network adapter> port 0xc020-0xc03f mem
0xfeb92000-0xfeb92fff,0xfe004000-0xfe007fff irq 11 at device 4.0 on pci0
vtnet1: <VirtIO Networking Adapter> on virtio_pci1
pfil: duplicate head "vtnet1"
810.828154 [ 450] vtnet_netmap_attach       vtnet attached txq=3D1, txd=3D2=
56
rxq=3D1, rxd=3D128
# devctl detach pci0:0:4:0
# vmstat -m | grep pfil
         pfil     7     1K        6  128


Actual Results
--------------

Leaks 'pfil' memory at each detach.



Expected Results
----------------

All memory allocated in attach is freed in the detach.


Build Date & Hardware
---------------------

root@freebsd:~ # uname -a
FreeBSD freebsd 13.0-RELEASE FreeBSD 13.0-RELEASE #0
releng/13.0-n244733-ea31abc261f: Fri Apr  9 04:24:09 UTC 2021=20=20=20=20
root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64


Additional Information
----------------------

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-260667-227>