Skip to contentSkip to conversation

opensm/osm_node_info_rcv.c: In ni_rcv_process_existing_ca_or_router, handle error

PATCH In review Hal Rosenstock 2 participants 2 messages Jul 12, 2012 – Jul 25, 2012 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm/osm_node_info_rcv.c: In ni_rcv_process_existing_ca_or_router, handle error

Add handling for case where osm_node_get_physp_ptr returns NULL pointer

---

opensm/osm_node_info_rcv.c +10 -0
index 58c92b9..293f0c8 100644
@@ -479,6 +479,16 @@ alias_done:
 
 	} else {
 		osm_physp_t *p_physp = osm_node_get_physp_ptr(p_node, port_num);
+
+		if (p_physp == NULL) {
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D1C: "
+				"No physical port found for node GUID 0x%"
+				PRIx64 " port %u. Might be duplicate port GUID\n",
+				cl_ntoh64(p_node->node_info.node_guid),
+				port_num);
+			goto Exit;
+		}
+
 		/*
 		   Update the DR Path to the port,
 		   in case the old one is no longer available.

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

A message that is not in the archive (sent off-list or not yet received): 4FFEF9EA.4060006-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org