Re: [PATCH net v1] net: phy: fix NULL deref in IRQ handler after unbind

From: Andrew Lunn

Date: Mon Aug 24 2026 - 09:00:14 EST


> The IRQ is requested at attach time and released by phy_disconnect(),
> so phy_remove() cannot free it without a later double-free.

So this sounds wrong.

If you unbind the PHY, you need to also unbind the MAC, since a MAC
without a PHY is useless. When the MAC unloads, it will call
phy_remove() so everything unwinds in the correct order.

Andrew

---
pw-bot: cr