[ovs-dev] [PATCH branch-2.3] ofproto-dpif: Use fat_rwlock instead of ovs_rwlock.

Ben Pfaff blp at nicira.com
Tue Apr 7 05:19:51 UTC 2015


On Mon, Apr 06, 2015 at 09:18:58PM -0700, Ansis Atteka wrote:
> This patch fixes a deadlock introduced by commit 6b59b543 (ovs-thread:
> Use fair (but nonrecursive) rwlocks on glibc.)
> 
> If STP is enabled, then a handler thread could have already had
> acquired "xlate_rwlock" in xlate_actions() and then might have
> attempt to acquire it again in xlate_send_packet() leading to
> a deadlock.
> 
> The patch fixes this deadlock by using fat_rwlock that still allows
> to acquire read lock in recursive manner.
> 
> VMware-BZ: #1425671
> 
> Reported-by: Scott Hendricks <shendricks at nicira.com>
> Signed-off-by: Ansis Atteka <aatteka at nicira.com>

This looks good to me at first glance but I'd like a second review.

Can you include the deadlocking backtrace in the commit message?

Would you mind also adding an explanation of how the same bug is avoided
on master?

Thanks,

Ben.



More information about the dev mailing list