[ofa-general] [PATCH] opensm/osm_mcast_mgr.c: fixing a seg. fault in processing mcast groups

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Wed Jan 9 05:18:19 PST 2008


Sasha,

This patch fixes a seg. fault in processing mcast groups
that I mentioned in my mail previously.
Feel free to replace it with more elegant solution.

Please apply it to master and ofed_1_3.

-- Yevgeny

Signed-off-by:  Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 opensm/opensm/osm_mcast_mgr.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c
index be220c5..ab9c260 100644
--- a/opensm/opensm/osm_mcast_mgr.c
+++ b/opensm/opensm/osm_mcast_mgr.c
@@ -1307,6 +1307,7 @@ osm_signal_t osm_mcast_mgr_process(IN osm_mcast_mgr_t * const p_mgr)
 	cl_qmap_t *p_mcast_tbl;
 	cl_qlist_t *p_list = &p_mgr->p_subn->p_osm->sm.mgrp_list;
 	osm_mgrp_t *p_mgrp;
+	osm_mgrp_t *p_tmp_mgrp;
 	boolean_t pending_transactions = FALSE;

 	OSM_LOG_ENTER(p_mgr->p_log, osm_mcast_mgr_process);
@@ -1326,9 +1327,10 @@ osm_signal_t osm_mcast_mgr_process(IN osm_mcast_mgr_t * const p_mgr)
 		/* We reached here due to some change that caused a heavy sweep
 		   of the subnet. Not due to a specific multicast request.
 		   So the request type is subnet_change and the port guid is 0. */
+		p_tmp_mgrp = (osm_mgrp_t *) cl_qmap_next(&p_mgrp->map_item);
 		mcast_mgr_process_mgrp(p_mgr, p_mgrp,
 				       OSM_MCAST_REQ_TYPE_SUBNET_CHANGE, 0);
-		p_mgrp = (osm_mgrp_t *) cl_qmap_next(&p_mgrp->map_item);
+		p_mgrp = p_tmp_mgrp;
 	}

 	/*
-- 
1.5.1.4




More information about the general mailing list