Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Feb 2024 20:49:57 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 277038] igc driver accesses hardware resources after they are released.
Message-ID:  <bug-277038-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.=



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