Hi Stephen, On Fri, Jun 08, 2018 at 11:14:57AM -0700, Stephen Hemminger wrote: ... > > notifiers are always called with RTNL mutex held > and dev->type should not change unless RTNL is held.
thanks for you answer. I am not talking about any race between notifiers vs dev->type change. I am talking that dev->type was already changed and a upcoming notifier ends in undefined behaviour when it derefences dev->priv. I have some notifier which maps a cast from dev->type to a specific structure at dev->priv. This structure is not there in tap/tun devices if they changed to "my" dev->type and the notifier occurs. - Alex