opensm/osm_port_info_rcv.c: Handle non-compliant SMA gracefully
PATCH 1/1 opensm/osm_port_info_rcv.c: Handle non-compliant SMA gracefully
If PortInfo.LocalPortNum > NodeInfo.NumPorts, then SMA is not compliant. In this case, ignore the portinfo response.
--- opensm/osm_port_info_rcv.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
opensm/osm_port_info_rcv.c +12 -0
@@ -552,6 +552,18 @@ void osm_pi_rcv_process(IN void *context, IN void *data) p_node = p_port->p_node;CL_ASSERT (p_node); +if (p_pi->local_port_num > p_node->node_info.num_ports) { +CL_PLOCK_RELEASE (sm->p_lock); +OSM_LOG (sm->p_log,OSM_LOG_ERROR ,"ERR 0F09: " +"PortInfo from %s node GUID 0x%" PRIx64 +" is non-compliant and is being ignored since the " +"local port num %u > num ports %u\n" , +ib_get_node_type_str (p_node->node_info.node_type), +cl_ntoh64 (p_node->node_info.node_guid), + p_pi->local_port_num, p_node->node_info.num_ports); + goto Exit; + } +/* If we were setting the PortInfo, then receiving this attribute was not part of sweeping the subnet.
Signature · 6 lines
1.7.8.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