[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250813064133.ms6juf27oc7ykvpk@DEN-DL-M31836.microchip.com>
Date: Wed, 13 Aug 2025 08:41:33 +0200
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: Paolo Abeni <pabeni@...hat.com>
CC: <andrew@...n.ch>, <hkallweit1@...il.com>, <linux@...linux.org.uk>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<richardcochran@...il.com>, <viro@...iv.linux.org.uk>, <atenart@...nel.org>,
<quentin.schulz@...tlin.com>, <olteanv@...il.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net v2] phy: mscc: Fix timestamping for vsc8584
The 08/12/2025 11:55, Paolo Abeni wrote:
Hi Paolo,
>
> On 8/6/25 7:46 AM, Horatiu Vultur wrote:
> > @@ -1567,6 +1592,7 @@ int vsc8584_ptp_probe(struct phy_device *phydev)
> >
> > mutex_init(&vsc8531->phc_lock);
> > mutex_init(&vsc8531->ts_lock);
> > + skb_queue_head_init(&vsc8531->rx_skbs_list);
>
> The aux work is cancelled by ptp_clock_unregister(), meaning the
> `rx_skbs_list` could be left untouched if the unreg happens while the
> work is scheduled but not running yet, casing memory leaks.
>
> It's not obvious to me where/how ptp_clock_unregister() is called, as
> AFAICS the vsc85xxx phy driver lacks the 'remove' op. In any case I
> think you need to explicitly flushing the rx_skbs_list list on removal.
Yes, I will flush the rx_skbs_list on removal.
I will look also to see where/how ptp_clock_unregister() is called, but
this will be in a different patch if it is an issue.
>
> Thanks,
>
> Paolo
>
--
/Horatiu
Powered by blists - more mailing lists