Re: [PATCH net-next v14 01/13] rtase: Add pci table supported in this module

Jakub Kicinski
2023-12-12T16:05:17Z

On Tue, 12 Dec 2023 10:36:16 +0100 Paolo Abeni wrote:
> > +static void rtase_remove_one(struct pci_dev *pdev)
> > +{
> > + struct net_device *dev = pci_get_drvdata(pdev);
> > + struct rtase_private *tp = netdev_priv(dev);
> > + struct rtase_int_vector *ivec;
> > + u32 i;
> > +
> > + for (i = 0; i < tp->int_nums; i++) {
> > + ivec = &tp->int_vector[i];
> > + netif_napi_del(&ivec->napi);
> > + }
>
> You must unregister the netdev before napi_del or you will risk races.

Or del them in the ndo_open / ndo_stop... Note that ndo_stop is always
called if ndo_open was called.