From: Simon Horman <horms@kernel.org>
To: mhun512@gmail.com
Cc: Wei Fang <wei.fang@nxp.com>,
netdev@vger.kernel.org, Frank Li <frank.li@nxp.com>,
Shenwei Wang <shenwei.wang@nxp.com>,
Richard Cochran <richardcochran@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
imx@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: fec: drain PEROUT requests before canceling the timer
Date: Sat, 26 Sep 2026 17:22:05 +0100 [thread overview]
Message-ID: <20260926162205.GX13925@horms.kernel.org> (raw)
In-Reply-To: <CAGEsz8EYe=gBFr_hEYFLUeiJMRtau=eV3cDUUmHJOQkC0qvfqw@mail.gmail.com>
On Thu, Sep 24, 2026 at 09:03:39PM -0500, mhun512@gmail.com wrote:
> fec_ptp_stop() cancels perout_timer before unregistering the PTP clock.
> A PEROUT ioctl can set perout_enable, release the driver's locks and
> then be preempted before hrtimer_start(). The unregister path waits for
> that ioctl, which can rearm the timer after it was canceled. Removal
> then frees the netdev containing the still-armed timer.
>
> Unregister the PTP clock first so all in-flight ioctls have returned
> before canceling the timer. Clear the PEROUT state and compare channel
> afterward, then disable PPS. Serialize the channel write with PTP clock
> shutdown and skip it when that clock is off.
>
> This issue was identified during our ongoing static-analysis research
> while reviewing kernel code.
>
> Fixes: 350749b909bf ("net: fec: Add support for periodic output signal of PPS")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
> ---
> drivers/net/ethernet/freescale/fec_ptp.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c
> b/drivers/net/ethernet/freescale/fec_ptp.c
> index 56801c2009d5..67901e036ac3 100644
> --- a/drivers/net/ethernet/freescale/fec_ptp.c
> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
> @@ -506,10 +506,13 @@ static int fec_ptp_pps_disable(struct
> fec_enet_private *fep, uint channel)
Hi Myeonghun, all,
This patch does not apply because the two lines above should be a single line.
Unfortunately this means that CI did not run on this patch.
Please repost after figuring out what went wrong here.
--
pw-bot: changes-requested
prev parent reply other threads:[~2026-09-26 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 2:03 [PATCH net] net: fec: drain PEROUT requests before canceling the timer mhun512
2026-09-26 16:22 ` Simon Horman [this message]
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=20260926162205.GX13925@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=frank.li@nxp.com \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhun512@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=shenwei.wang@nxp.com \
--cc=wei.fang@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.