From nobody Fri Dec 24 16:26:32 2021 X-Original-To: bugs@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 F20BC1919B8E for ; Fri, 24 Dec 2021 16:26:32 +0000 (UTC) (envelope-from bugzilla-noreply@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 4JLCB051CZz4kT8 for ; Fri, 24 Dec 2021 16:26:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 8BF4527031 for ; Fri, 24 Dec 2021 16:26:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1BOGQWxR040445 for ; Fri, 24 Dec 2021 16:26:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1BOGQWJM040444 for bugs@FreeBSD.org; Fri, 24 Dec 2021 16:26:32 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260667] [vtnet] net driver leaks when detached Date: Fri, 24 Dec 2021 16:26:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: ghuckriede@blackberry.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640363192; 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=ovh9m56k8lI//FJ2MKaX3kmzo74Xulit593EDGfA2Gs=; b=oGlLT07E5dd9nBTpi/nbjq6G3BHpO251G2RQ8uczVz0VpuK+4w9e5pfjpDLufxI3Djej/9 iDB+AnA2k/JmFpebVtXaRbl8Op/FxKUgBqfEWEJGLCJoZTaPVpj6vyOeZDVknueRwiyWkv oqHMTqKfEef2XIFt+h2k6FrkvmE8Y+PukGqlWMy5is7IT95mnoi12/PbeWcZodeYnwbC+p fNxi/sY66OG89DFUvoEAZTEh7C9FZnvetd1aCikeRCPi9jyaptLUC1OxOZP9sGo0KEA2PK oBP9q1PG7MxHwfl5fW2k8y2cGutRpil6WMF6+IJmHn41cnDeyhlFRdA6XHIRrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640363192; a=rsa-sha256; cv=none; b=PpxidTUCh1zEqosfIDiiSu//sH85rjnkPP9q7FErkt1kQzR5TNzmYZstvL6llmtnnrS3ZJ aBRVLUT8tRrkl4qEEyNR2RDh7yUXgxE6Y3K3jktVGDhz1VCQcOVlQ2EWkp1+ajWBCR9DGZ 8ynKgZ0xRQ4oFvTZ66dSm97MHgKvmA7xoWbo6CbnyKt/FvThzXns39UIEE5q0EA4EvtDio 27IVzAnD1vtxINGYHpUYnSLizL/l+GsljlL72BWo+JZ/brXoeaJNADldKy0/MIdH1vIAmo it/XexqVG+VyAUSV/EngAfsBhDXWcK4cIF3/u4NxVurgvdWs3hva7L8VZJ38aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N 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: port 0xc020-0xc03f mem 0xfeb92000-0xfeb92fff,0xfe004000-0xfe007fff irq 11 at device 4.0 on pci0 vtnet1: 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.=