Re: mutex usage in if_bridge vs other drivers

2016-12-07 Thread Konstantin Belousov
On Wed, Dec 07, 2016 at 05:41:51PM +0800, Sepherosa Ziehau wrote: > On Sat, Dec 3, 2016 at 3:36 PM, Chris Torek wrote: > >>... Dropping the lock is entirely the wrong thing to do -- as > >>you note, if we do, then the bridge members can change out from > >>under us. The only path forward is to us

Re: mutex usage in if_bridge vs other drivers

2016-12-07 Thread Sepherosa Ziehau
On Sat, Dec 3, 2016 at 3:36 PM, Chris Torek wrote: >>... Dropping the lock is entirely the wrong thing to do -- as >>you note, if we do, then the bridge members can change out from >>under us. The only path forward is to use an sx lock, but ... > [snip] >>In code paths that modify the list of br

Re: mutex usage in if_bridge vs other drivers

2016-12-02 Thread Chris Torek
>... Dropping the lock is entirely the wrong thing to do -- as >you note, if we do, then the bridge members can change out from >under us. The only path forward is to use an sx lock, but ... [snip] >In code paths that modify the list of bridge members, hold both the >BRIDGE_LOCK and the new sx lo

Re: mutex usage in if_bridge vs other drivers

2016-12-02 Thread Ryan Stone
On Fri, Dec 2, 2016 at 3:42 PM, Chris Torek wrote: > THE QUESTION: > > - Who is wrong, the bxe driver or the bridge code? I.e., >does the bridge driver need to release its lock here, >and if so, is that actually safe to do? (We might need >to restart the loop over all the members if