opensm/vendor: fix portguids array size
PATCH 1/1 opensm/vendor: fix portguids array size
As discovered and suggested in bug #2001 OpenSM ibumad vendor in function osm_vendor_open_port() Fix portguids array size passed to umad_get_ca_portguids().
--- opensm/libvendor/osm_vendor_ibumad.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
opensm/libvendor/osm_vendor_ibumad.c +2 -3
@@ -637,9 +637,8 @@ osm_vendor_open_port(IN osm_vendor_t * const p_vend, }for (ca =0 ; ca < p_vend->ca_count; ca++) { -if ((r =umad_get_ca_portguids (p_vend->ca_names[ca], - portguids, -OSM_UMAD_MAX_CAS )) <0 ) { +if ((r =umad_get_ca_portguids (p_vend->ca_names[ca], portguids, +OSM_UMAD_MAX_PORTS_PER_CA +1 )) <0 ) {OSM_LOG (p_vend->p_log,OSM_LOG_ERROR ,"ERR 5421: " "Unable to get CA %s port guids (%s)\n" , p_vend->ca_names[ca],strerror (r));
Signature · 6 lines
1.7.0.4 -- 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