From: Andrew Lunn <andrew@lunn.ch>
To: Xuanqiang Luo <xuanqiang.luo@linux.dev>
Cc: netdev@vger.kernel.org, hkallweit1@gmail.com,
linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org,
Xuanqiang Luo <luoxuanqiang@kylinos.cn>,
stable@vger.kernel.org
Subject: Re: [PATCH net v1] net: phy: fix NULL deref in IRQ handler after unbind
Date: Mon, 24 Aug 2026 14:54:47 +0200 [thread overview]
Message-ID: <e289a01b-d0a5-4296-b8b1-9b5935ee6854@lunn.ch> (raw)
In-Reply-To: <20260824120703.107412-1-xuanqiang.luo@linux.dev>
> 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
next prev parent reply other threads:[~2026-08-24 12:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 12:07 [PATCH net v1] net: phy: fix NULL deref in IRQ handler after unbind Xuanqiang Luo
2026-08-24 12:54 ` Andrew Lunn [this message]
2026-08-25 3:34 ` Xuanqiang Luo
2026-08-25 13:03 ` Andrew Lunn
2026-08-26 7:54 ` Xuanqiang Luo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e289a01b-d0a5-4296-b8b1-9b5935ee6854@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luoxuanqiang@kylinos.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=xuanqiang.luo@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox