Re: [PATCH net v3] octeon_ep_vf: Resolve netdevice usage count issue
From: Jakub Kicinski
Date: Thu Apr 17 2025 - 22:25:59 EST
On Wed, 16 Apr 2025 13:26:43 -0700 Jacob Keller wrote:
> > @@ -834,7 +833,6 @@ static void octep_vf_tx_timeout(struct net_device *netdev, unsigned int txqueue)
> > {
> > struct octep_vf_device *oct = netdev_priv(netdev);
> >
> > - netdev_hold(netdev, NULL, GFP_ATOMIC);
> > schedule_work(&oct->tx_timeout_task);
> > }
> I guess the thought was that we need to hold because we scheduled a work
> item?
Looks like something I would have asked them to do :)
But it was probably merged before I could review next version ?
I mean, passing NULL for the tracker is... quite something.
> Presumably the driver would simply cancel_work_sync() on this timeout
> task before it attempts to release its own reference on the netdev, so
> this really doesn't protect anything.
It does, but before unregistering :/
Sathesh, schedule_work() returns a value. You should use it.