Re: [PATCH] net: make netdev_wait_allrefs wake-able

2020-09-17 Thread Francesco Ruggeri
On Wed, Sep 16, 2020 at 11:51 PM Eric Dumazet wrote: > > Honestly I would not touch dev_put() at all. > > Simply change the msleep(250) to something better, with maybe > exponential backoff. OK, I will try that. Francesco

Re: [PATCH] net: make netdev_wait_allrefs wake-able

2020-09-16 Thread Francesco Ruggeri
> static inline void dev_put(struct net_device *dev) > { > + struct task_struct *destroy_task = dev->destroy_task; > + > this_cpu_dec(*dev->pcpu_refcnt); > + if (destroy_task) > + wake_up_process(destroy_task); > } I just realized that this introduces a race, i