opensm: fix locking in osm_guid_mgr_process
PATCH 1/1 opensm: fix locking in osm_guid_mgr_process
osm_guid_mgr_process() should take lock when processing alias_guid_list.
--- opensm/osm_guid_mgr.c | 2 ++ 1 file changed, 2 insertions(+)
opensm/osm_guid_mgr.c +2 -0
@@ -129,6 +129,7 @@ void osm_guid_mgr_process(IN osm_sm_t * sm) {OSM_LOG (sm->p_log,OSM_LOG_DEBUG ,"Processing alias guid list\n" ); +CL_PLOCK_EXCL_ACQUIRE (sm->p_lock);while (cl_qlist_count (&sm->p_subn->alias_guid_list)) { p_obj = (osm_guidinfo_work_obj_t *)cl_qlist_remove_head (&sm->p_subn->alias_guid_list); guidinfo_set(&sm->p_subn->p_osm->sa, p_obj->p_port,
@@ -136,5 +137,6 @@ void osm_guid_mgr_process(IN osm_sm_t * sm) {osm_guid_work_obj_delete (p_obj); } +CL_PLOCK_RELEASE (sm->p_lock);OSM_LOG_EXIT (sm->p_log); }
Signature · 6 lines
1.7.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html