From nobody Tue Feb 13 20:49:57 2024 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 4TZD3T5jJ2z59klW for ; Tue, 13 Feb 2024 20:49:57 +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 4TZD3T0yztz4TtB for ; Tue, 13 Feb 2024 20:49:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707857397; a=rsa-sha256; cv=none; b=VK95Nfobs78tsU5HuTmHdy9fywINum+fz9y9aPec43Mgc4nXFJ6ONE5N6Vd8x7hKl942XV FI+CKRybWcslF0XGOkBNFA3/SIuqqjzfLtB+oiBPkSOzSy1A9rvSt9xU8TIU44YTgkbz7v SoCKM/afzKV8i8Wf1QKBSVCj5f2GRnpUp3z389jpXT1i34g86b4F+BVnPCWnbgQOBZWteX NRVODB77wSex6BdGD7YHtdU4OItN1Z6EaPKlTtM/YGVpMy/I4VFyXKOzgm9qsHZC5TvIS7 0AVqhvcnVjnvMaL08LSoqdJqdmpETTEgpqKEjt6jo3wMf9zKp0X9aeLaOFwLCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707857397; 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=fy86/bg77emkNeRX1faIMLd9zJALlyvdVKRSXGvMb2M=; b=xb/qmKDBibrilVmRvWhnIvvIOTPmjGY8rPp8v8Seg8dDiivXrG0NTQxRH1c7Zk3jI/C34G p8iotCxga/3J+nnft59zSMk66ViwR2kSYvyYNBV5A1ewQHKv3DDjIjTWXvkkTjoFJtwpGw F2r91SahWuLfEYr819N479xfoV5f/uWNlrAHuSn4uO1auvEEjo7vGAVadf2rv3GvkEs48M ztGUVGqbtLYwTvlyP3hv9MgVpi3P8JNKUaH92zO5a1M8zmGDOrhmxhAyUgQ4fYjCIWQd5Y WxvVOsBvIAWe6k7DpmSiR2ZR3pbcDShhLZVYkIcha+8rhHczdi8I/29Ch2B0/A== 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 4TZD3S6VR1zW3l for ; Tue, 13 Feb 2024 20:49:56 +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 41DKnuZR074767 for ; Tue, 13 Feb 2024 20:49:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 41DKnunq074765 for bugs@FreeBSD.org; Tue, 13 Feb 2024 20:49:56 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 277038] igc driver accesses hardware resources after they are released. Date: Tue, 13 Feb 2024 20:49:57 +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.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: mibelanger@qnx.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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277038 Bug ID: 277038 Summary: igc driver accesses hardware resources after they are released. Product: Base System Version: 13.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: mibelanger@qnx.com This problem will occur with "devctl detach igc0" In iflib it is typical to call the following: IFDI_DETACH(ctx); IFDI_QUEUES_FREE(ctx); In if_igc.c: - igc_if_detach calls igc_free_pci_resources. - igc_if_queues_free function calls igc_release_hw_control. igc_if_queues_free must not call igc_release_hw_control, as the hw resource= has been free'd in the detach call. It should be sufficient to ensure that igc_release_hw_control is called just prior to any call to igc_free_pci_resource, which appears to be the case. = The extra call to igc_release_hw_control in igc_if_queues_free is unnecessary. One could consider moving the release_hw_control into the implementation of igc_free_pci_resources. --=20 You are receiving this mail because: You are the assignee for the bug.=