[ovs-dev] [PATCH] lacp: Really fix mutex initialization.

Ben Pfaff blp at nicira.com
Wed May 7 18:18:50 UTC 2014


On Tue, May 06, 2014 at 12:50:10PM -0700, Ben Pfaff wrote:
> Commit 2a3fb0aa3c (lacp: Don't lock potentially uninitialized mutex in
> lacp_status().) fixed one bug related to acquiring the file scope 'mutex'
> without initializing it.  However, there was at least one other, in
> lacp_unixctl_show().  One could just fix that one problem, but that leaves
> the possibility that I might have missed one or two more.  This commit
> fixes the problem for good, by adding a helper that initializes the mutex
> and then acquires it.
> 
> It's not entirely clear why 'mutex' is a recursive mutex.  I think that it
> might be just because of the callback in lacp_run().  An alternate fix,
> therefore, would be to eliminate the callback and therefore the need for
> runtime initialization of the mutex.
> 
> Bug #1245659.
> Reported-by: Jeffrey Merrick <jmerrick at vmware.com>
> Signed-off-by: Ben Pfaff <blp at nicira.com>

I'd appreciate a review, because this is actually causing problems in
testing (I guess we run "ovs-appctl lacp/show" in testing whether
there are any LACP interfaces or not).



More information about the dev mailing list