> There are definitely ways around the thread safety analysis.  My
> feeling is that we should be pretty strict about it except in modules
> where contention is a real problem.
>
>> Why does stp need a recursive mutex?  I don't see any natural
>> recursion here.

So looking back at this, I'd like to keep the recursive mutex.
stp_send_bpdu() uses a call back function to send a packet through
ofproto-dpif.  If this packet is going through a patch port it could
loop back into the stp module causing a dead lock.  I don't think
there's a clean thread safe way to do this without the recursive mutex
short of ditching the call back function.  I'd be all for doing that
in future, but for now I'd prefer to keep the patch as-is (with the
possible addition of a comment explaining why the recursive mutex is
necessary).


Thoughts?
Ethan
X-CudaMail-Whitelist-To: dev@openvswitch.org
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to