https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293307

            Bug ID: 293307
           Summary: if_rge detach cleanup for crash when error occurs
                    during attach
           Product: Base System
           Version: 14.3-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 268203
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=268203&action=edit
Updated patch for crash

As requested in Bug 292879 here's an updated patch for if_rge to avoid crashing
in detach if an error occurs while attaching.  The additional changes are to
avoid calling bus_dmamap_unload if the memory hasn't been allocated and to
postpone zeroing q->q_tx / q->q_rx until after the related buffers have been
freed.

The code to handle an all zeros eaddr is included just because (obviously
unrelated to the panic).

Tested on a FriendlyElec NanoPC-T6 LTS RK3588 where at the moment rge reset is
falling during the attach probably due to recent platform code changes (I'm in
the process of bringing up FreeBSD on this platform).

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

Reply via email to