Message ID | 4FFEF9EA.4060006@dev.mellanox.co.il (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Alex Netes |
Headers | show |
Hi Hal, On 12:23 Thu 12 Jul , Hal Rosenstock wrote: > > Add handling for case where osm_node_get_physp_ptr returns NULL pointer > > Signed-off-by: Hal Rosenstock <hal@mellanox.com> > --- Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/opensm/osm_node_info_rcv.c b/opensm/osm_node_info_rcv.c index 58c92b9..293f0c8 100644 --- a/opensm/osm_node_info_rcv.c +++ b/opensm/osm_node_info_rcv.c @@ -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.
Add handling for case where osm_node_get_physp_ptr returns NULL pointer Signed-off-by: Hal Rosenstock <hal@mellanox.com> --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html