> From: Herbert Xu [mailto:herb...@gondor.apana.org.au] > Sent: Thursday, April 27, 2017 4:16 PM > On Tue, Apr 25, 2017 at 08:01:50PM +0800, gfree.w...@foxmail.com wrote: > > From: Gao Feng <f...@ikuai8.com> > > [...] > > This has the potential of creating future bugs, because there is no guarantee > that the ndo_init function has been invoked at all. > > Wouldn't it be safer to move the freeing from the destructors into their > ndo_uninit functions instead?
I considered about this solution, I am not sure if it is safe to move the freeing from destructors into ndo_uninit. Because when the free action is done in ndo_uninit, it is earlier than destructor. I am not sure if it break the design of original driver. I just tested the team driver before. It is ok to free all mems in ndo_uninit. Is it possible that anyone are using the net_dev after ndo_uninit ? If no one, i would like to update the patch. Could you give me some guide please? Regards Feng > > Thanks, > --