Herbert Xu wrote: > Doing the wait when IFF_RUNNING is off isn't necessary though. If > IFF_RUNNING isn't set, then either the device has never been activated > or we've already carried out those waits the last time we were in > dev_deactivate. Right. But it still depends on what the synchronization is meant to protect us from. It isn't clear to me, whether it's o packets in flight o qdisc references o device references so yes, I tried to play it safe. Anyway, given the comments from Thomas, I've pulled out the IFF_RUNNING stuff. We can add this later, when the other uses have been sorted out. > I understand your preference for defensive programming. However, in > cases like this it's better to do the obvious thing because: > > 1) We don't cover up bugs that may come back to bite us elsewhere. > 2) We don't give people misconceptions. If they're unfamiliar with > the system they may infer things from this code that aren't necessarily > the case. I totally agree with this. -Tommy