From: YOSHIFUJI Hideaki <[EMAIL PROTECTED]> Date: Fri, 28 Apr 2006 02:04:56 +0900 (JST)
> We eliminated rt6_dflt_lock (to protect default router pointer) > at 2.6.17-rc1, and introduced rt6_select() for general router selection. > The function is called in the context of rt6_lock read-lock held, > but this means, we have some race conditions when we do round-robin. > > Am I correct? > > If so, we should put some spin_lock for serialization. > > Comments? > > Signed-off-by; YOSHIFUJI Hideaki <[EMAIL PROTECTED]> > > Or, should we run whole part of rt6_select() under some lock? I think the local lock will work and it is fine for now. I will apply this as-is to fix the bug. But in the longer term this seems a little bit heavy operation. Perhaps there is some way to use "xchg()" here? It is just moving a pointer around for a round robin list, if it could be reduced to just a single pointer store, we could even do it without atomic operations. - 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