On Tue, 2005-22-11 at 03:56 +0100, Patrick McHardy wrote: > jamal wrote: > > > Are you suggesting not to check for IN_DEV_PROMOTE_SECONDARIES the > > second time? > > Yes. promote can only be non-NULL if it was set at the time the first > check was performed. > If you check twice and it is changed in between > the secondaries will get neither removed nor promoted. In fact, > the first check inside the loop should also happen outside of the > loop so if it changes from 0 to 1 while the loop is running not > half the addresses are removed and then the next one promoted.
Of course, the underlying assumption is that in fact it could happen. Could it actually happen? Because if that was the case, a lot of code in the net area would need to be audited and fixed. I think i should remove the second check because it is redundant actually regardless - but if serves the purpose of avoiding a race even better. cheers, jamal - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html