Re: [PATCH net v3] net: fec: Propagate PTP initialization errors
From: Bui Duc Phuc
Date: Sun Sep 06 2026 - 22:28:54 EST
> >
> > This is a pre-existing issue:
> >
> > Previously, I suggested using request_irq() and free_irq() manually,
> > but that would add more code.
> > Another option is to replace alloc_etherdev_mqs() with
> > devm_alloc_etherdev_mqs(). With the LIFO cleanup order,
> > devm_request_irq() will be cleaned up before free_netdev(res->ndev),
> > which should resolve the issue.
> >
> > Since this is a long-standing, pre-existing issue, I think it would be
> > better to handle it in a separate patch.
>
> This issue is currently being addressed in another thread:
> https://lore.kernel.org/imx/20260904-fec-ptp-pps-event-uaf-v1-2-9af446be4a11@xxxxxxxx/
>
Oh, great! I see it now.
However, it looks like that patch does not fully address the root cause.
There are two places where devm_request_irq() is called:
For PPS in fec_ptp_init().
In probe():
devm_request_irq(&pdev->dev, irq, fec_enet_interrupt,
0, pdev->name, ndev);
The approach in that patch only handles the first case, so it does not
fully solve the problem.