* [PATCH] opensm: fix locking in osm_guid_mgr_process
@ 2012-06-03 9:08 Alex Netes
0 siblings, 0 replies; only message in thread
From: Alex Netes @ 2012-06-03 9:08 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
osm_guid_mgr_process() should take lock when processing alias_guid_list.
Signed-off-by: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
opensm/osm_guid_mgr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/opensm/osm_guid_mgr.c b/opensm/osm_guid_mgr.c
index 73a32ac..42c7794 100644
--- a/opensm/osm_guid_mgr.c
+++ b/opensm/osm_guid_mgr.c
@@ -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);
}
--
1.7.10.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-03 9:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-03 9:08 [PATCH] opensm: fix locking in osm_guid_mgr_process Alex Netes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox