jamal wrote:
On Tue, 2005-22-11 at 03:18 +0100, Patrick McHardy wrote:


it still has a different race, IN_DEV_PROMOTE_SECONDARIES can change
between the first and the second check, just checking for promote != NULL is enough and prevents that race.



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.
-
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

Reply via email to