From: Andrew Lunn <andrew@lunn.ch>
To: 李广硕 <liguangshuo@mail.sdu.edu.cn>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH net] net: phy: micrel: Fix potential shared PHC use-after-free
Date: Mon, 9 Nov 2026 14:24:33 +0100 [thread overview]
Message-ID: <198e6702-0663-4183-9aaf-0fa4082dbf79@lunn.ch> (raw)
In-Reply-To: <AHAASAAGLPGJfVjn9skPJKoS.3.1794229559658.Hmail.202321181@mail.sdu.edu.cn>
> >.probe() and .remove() should be opposites of each other. What happens
> >if you do that?
> >
> > Andrew
> >
> >---
> >pw-bot: cr
> >
>
> On LAN8814, one PHY registers the shared PHC and owns its pin array.
> If that PHY unregisters the clock in .remove(), the clock goes away
> before the pins are freed. If another port is still bound, it loses
> access to the PHC. I added the handoff in v1 to keep the clock
> available in that case.
>
> I'll rework this around the PHY that registered the clock. I'll check
> how the remaining ports report the PHC after that PHY unbinds, and
> what happens if it binds again while another port is still up.
That is not what i asked for:
.probe() and .remove() should be opposites of each other.
Take the probe function and reverse the order of the lines.
Then reverse what each function does.
Andrew
next prev parent reply other threads:[~2026-11-09 13:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 6:54 Guangshuo Li
2026-11-07 14:40 ` Andrew Lunn
2026-11-09 13:05 ` 李广硕
2026-11-09 13:24 ` Andrew Lunn [this message]
2026-11-08 7:15 ` netdev-bot+sashiko
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=198e6702-0663-4183-9aaf-0fa4082dbf79@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=liguangshuo@mail.sdu.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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
all inboxes | Powered by JetHome®