Re: [PATCH net] net: read dev->needs_free_netdev before potentially freeing dev

2020-08-25 Thread Dan Carpenter
On Mon, Aug 24, 2020 at 10:06:50PM +0200, Jason A. Donenfeld wrote: > If dev->needs_free_netdev is true, it means that netdev_run_todo should > call free_netdev(dev) after it calls dev->priv_destructor. If > dev->needs_free_netdev is false, then it means that either > dev->priv_destructor is taking

Re: [PATCH net] net: read dev->needs_free_netdev before potentially freeing dev

2020-08-24 Thread Jason A. Donenfeld
On Mon, Aug 24, 2020 at 10:07 PM Jason A. Donenfeld wrote: > I believe that the bug Dan reported would easily be fixed as well by > just setting dev->needs_free_netdev=true and removing the call to > free_netdev(dev) in wg_destruct, in wireguard. If you think that this is > the more proper fix --