On Fri, Jul 26, 2013 at 06:07:04PM -0700, Ethan Jackson wrote:
> Signed-off-by: Ethan Jackson <et...@nicira.com>

Why does cfm_generate_maid() need the mutex?  It doesn't seem to use
any static data and when it is called the new struct cfm isn't visible
outside the running thread.

Can all_cfms be a const pointer, e.g:
    static struct hmap *const all_cfms OVS_GUARDED_BY(mutex) = &all_cfms__;

I think there's at least one deadlock.  cfm_unixctl_show() takes the
lock, calls cfm_print_details(), which calls cfm_get_fault(), which
takes the lock.

The caller can't use cfm_get_remote_mpids()'s returned data in a
race-free way.

Thanks,

Ben.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to