Re: [PATCH] wext: fix message delay/ordering

2016-01-27 Thread Johannes Berg
On Wed, 2016-01-27 at 13:18 +0100, Johannes Berg wrote: > > > + if (state == NETDEV_UNREGISTER) > > > + wireless_nlevent_flush(); > > > > > It could be argued that the state check isn't really necessary and > > should be removed to avoid ordering issues with up/down vs. wext, > > but > > t

Re: [PATCH] wext: fix message delay/ordering

2016-01-27 Thread Johannes Berg
> > + if (state == NETDEV_UNREGISTER) > > + wireless_nlevent_flush(); > > > It could be argued that the state check isn't really necessary and > should be removed to avoid ordering issues with up/down vs. wext, but > this fixes the really strange issue where you get an RTM_NEWLINK > a

Re: [PATCH] wext: fix message delay/ordering

2016-01-27 Thread Johannes Berg
On Wed, 2016-01-27 at 13:14 +0100, Johannes Berg wrote: >  > +static int wext_netdev_notifier_call(struct notifier_block *nb, > +  unsigned long state, void *ptr) > +{ > + /* > +  * When a netdev is unregistered, flush all pending messages > +  * to avoid

[PATCH] wext: fix message delay/ordering

2016-01-27 Thread Johannes Berg
From: Johannes Berg Beniamino reported that he was getting an RTM_NEWLINK message for a given interface, after the RTM_DELLINK for it. It turns out that the message is a wireless extensions message, which was sent because the interface had been connected and disconnection while it was deleted cau