Skip to contentSkip to conversation

opensm/osm_drop_mgr.c: GID out trap fix

PATCH New Alex Netes 1 participant 1 message Nov 15, 2011 InfiniBand

lore
Share & tools
lore

Alex Netes

author
#0 lore raw

PATCH 1/1 opensm/osm_drop_mgr.c: GID out trap fix

Because removed port GUID was deleted from port_guid_tbl, osm_report_notice() failed when trying to locate source port GUID

---
 opensm/osm_drop_mgr.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
opensm/osm_drop_mgr.c +3 -2
index 10b51e2..31f8970 100644
@@ -173,8 +173,7 @@ static void drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
 		"Unreachable port 0x%016" PRIx64 "\n", cl_ntoh64(port_guid));
 
 	p_port_check =
-	    (osm_port_t *) cl_qmap_remove(&sm->p_subn->port_guid_tbl,
-					  port_guid);
+	    (osm_port_t *) cl_qmap_get(&sm->p_subn->port_guid_tbl, port_guid);
 	if (p_port_check != p_port) {
 		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0101: "
 			"Port 0x%016" PRIx64 " not in guid table\n",
@@ -224,6 +223,8 @@ static void drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
 		}
 	}
 
+	cl_qmap_remove(&sm->p_subn->port_guid_tbl, port_guid);
+
 	p_sm_guid_tbl = &sm->p_subn->sm_guid_tbl;
 	p_sm = (osm_remote_sm_t *) cl_qmap_remove(p_sm_guid_tbl, port_guid);
 	if (p_sm != (osm_remote_sm_t *) cl_qmap_end(p_sm_guid_tbl)) {
Signature · 7 lines
1.7.7.1

-- Alex
--
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