Public bug reported:

SRU Justification:

[Impact]

Two crashes were reported on KR260 running Ubuntu Core 24 with
6.8.0-1043-xilinx.

During boot, the MACB probe error path frees an MDIO bus that
macb_mii_init() has already freed. The log shows a warning in
mdiobus_unregister() followed by a BUG in kfree(), called from
mdiobus_free().

During restart without a connected monitor, xlnx_fb_fini() calls
unregister_framebuffer() with a NULL fb_info pointer. This causes a kernel
panic in the shutdown process.

[Fix]

The MACB patch removes the repeated MDIO cleanup and unregisters the net
device after macb_mii_init() fails. It also releases the initialized
generic PHY if register_netdev() fails.

The fbdev patch only unregisters the framebuffer when fb_info is present.
The remaining framebuffer and helper cleanup is unchanged.

Both patches fix Xilinx downstream code that differs from mainline, so
they are submitted as SAUCE changes.

[Test Plan]

The changes have been tested on KR260.

[Where problems could occur]

The MACB patch changes cleanup after probe errors. The successful probe
path is unchanged.

The fbdev patch adds a NULL check around framebuffer unregistration and
deferred-I/O cleanup. The cleanup sequence for a valid fb_info is
unchanged.

[Other Info]

The MACB failure was introduced by an incorrect conflict resolution
during a kernel crank (rebase).

An upstream pull into the parent kernel changed fb_info allocation and
caused the earlier fbdev boot failure tracked in LP #2171424. The fix for
that issue is already in 6.8.0-1043.44. This fbdev patch adds the missing
NULL check during shutdown.

** Affects: linux-xilinx (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux-xilinx (Ubuntu Noble)
     Importance: High
     Assignee: Krystian Kaniewski (kkaniewski)
         Status: Triaged

** Also affects: linux-xilinx (Ubuntu)
   Importance: Undecided
       Status: New

** No longer affects: linux (Ubuntu)

** Also affects: linux-xilinx (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Changed in: linux-xilinx (Ubuntu Noble)
   Importance: Undecided => High

** Changed in: linux-xilinx (Ubuntu Noble)
       Status: New => Triaged

** Changed in: linux-xilinx (Ubuntu Noble)
     Assignee: (unassigned) => Krystian Kaniewski (kkaniewski)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175008

Title:
  linux-xilinx: KR260 MACB boot crash and headless fbdev reboot panic

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-xilinx/+bug/2175008/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to